0% found this document useful (0 votes)
50 views8 pages

Viva Questions DBM SD Cet

The document contains a comprehensive list of DBMS lab viva questions and answers, covering fundamental concepts such as databases, DBMS, data models, normalization, and SQL. It outlines advantages and disadvantages of DBMS, various types of data independence, and different normal forms in database design. Additionally, it discusses key database components, operations, and utilities related to Oracle databases.

Uploaded by

ms78601430
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views8 pages

Viva Questions DBM SD Cet

The document contains a comprehensive list of DBMS lab viva questions and answers, covering fundamental concepts such as databases, DBMS, data models, normalization, and SQL. It outlines advantages and disadvantages of DBMS, various types of data independence, and different normal forms in database design. Additionally, it discusses key database components, operations, and utilities related to Oracle databases.

Uploaded by

ms78601430
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DECCAN COLLEGE OF ENGINEERING & TECHNOLOGY

(A Unit of Deccan Group of Institutions)


Dar-us-salam, Aghapura, Hyderabad-500 001 (T.S.)

DBMS LAB VIVA Questions with Answers

1. What is database?
Ans: A database is a logically coherent collection of data with some inherent
meaning, representing some aspect of real world and which is designed, built and
populated with data for a specific purpose.
2. What is DBMS?
Ans: A DBMS (Database Management System) is software that allows users to
create, manage, and manipulate databases. It helps in defining, constructing, and
controlling access to the database.
3. What is a Database system?
Ans: The database and DBMS software together is called as Database system.
4. Advantages of DBMS?
Ans:
• Redundancy is controlled.
• Unauthorized access is restricted.
• Providing multiple user interfaces.
• Enforcing integrity constraints.
• Providing backup and recovery.
5. Disadvantage in File Processing System?
Ans:
• Data redundancy & inconsistency.
• Difficult in accessing data.
• Data isolation.
• Data integrity.
• Concurrent access is not possible.
• Security Problems.
6. Describe the three levels of data abstraction?
Ans: Three levels of abstraction:
Physical level: The lowest level of abstraction describes how data are stored.
Logical level: The next higher level of abstraction, describes what data are stored
in database and what relationship among those data.
View level: The highest level of abstraction describes only part of entire database.
7. Define the "Integrity rules"
Ans: There are two Integrity rules.
Entity Integrity: States that Primary key cannot have NULL value Referential
Integrity: States that Foreign Key can be either a NULL value or should be
Primary Key value of other relation.

8. What is extension and intension?


Ans: Extension -It is the number of tuples present in a table at any instance.
This is time dependent.
Intension -It is a constant value that gives the name, structure of table and the
constraints laid on it.
9. How is the data structure of System R different from the relational
structure?
Ans: Unlike Relational systems in System R
• Domains are not supported
• Enforcement of candidate key uniqueness is optional
• Enforcement of entity integrity is optional
• Referential integrity is not enforced
10. What is Data Independence?
Ans: Data independence means that “The application is independent of the
storage structure and access strategy of data.
or
Data independence means changes in the database structure at one level do not
affect the schema at the next higher level.
Two types of Data Independence:
Physical Data Independence: Modification in physical level should not affect
the logical level.
Logical Data Independence: Modification in logical level should affect the view
level.
NOTE: Logical Data Independence is more difficult to achieve
11. What is a view? How it is related to data independence?
Ans: A view is a virtual table derived from base tables, with its definition stored
in the data dictionary. It helps provide logical data independence by insulating
users from changes in the database structure.
12. What is Data Model?
Ans: A collection of conceptual tools for describing data, data relationships data
semantics and constraints.
13. What is E-R model?
Ans: This data model is based on real world that consists of basic objects called
entities and of relationship among these objects. Entities are described in a
database by a set of attributes.
14. What is Object Oriented model?
Ans: The object-oriented model organizes data as objects, which have variables
to store values and methods to perform actions. Objects with similar features are
grouped into classes.
15. What is an Entity?
Ans: It is a 'thing' in the real world with an independent existence.
16. What is an Entity type?
Ans: It is a collection (set) of entities that have same attributes.
17. What is an Entity set?
Ans: It is a collection of all entities of particular entity type in the database.
18. What is an Extension of entity type?
Ans: The collections of entities of a particular entity type are grouped together
into an entity set.
19. What is Weak Entity set?
Ans: An entity set may not have sufficient attributes to form a primary key, and
its primary key compromises of its partial key and primary key of its parent entity,
then it is said to be Weak Entity set.
20. What is an attribute?
Ans: It is a particular property, which describes the entity.
21. What is a Relation Schema and a Relation?
Ans: A relation schema R(A1, A2, ..., An) consists of a relation name R and its
attributes Ai. A relation is a set of tuples, where each tuple is an ordered list of
values t= (v1, v2... vn).
22. What is Relationship set?
Ans: The collection (or set) of similar relationships.
23. What is Relationship type?
Ans: Relationship type defines a set of associations or a relationship set among a
given set of entity types.
24. What is DDL (Data Definition Language)?
Ans: A data base schema is specified by a set of definitions expressed by a special
language called DDL.
25. What is Data Storage - Definition Language?
Ans: Data storage-definition language is a special type of DDL used to define
storage structures and access methods in a database system.
26. What is DML (Data Manipulation Language)?
Ans: This language that enables user to access or manipulate data as organized
by appropriate data model.
Procedural DML or Low level: DML requires a user to specify what data are
needed and how to get those data.
Non-Procedural DML or High level: DML requires a user to specify what data
are needed without specifying how to get those data.
27. What is DML Compiler?
Ans: It translates DML statements in a query language into low-level instruction
that the query evaluation engine can understand.
28. What is DDL Interpreter?
Ans: It interprets DDL statements and records them in tables containing metadata.
29. What is Record-at-a-time?
Ans: The Low level or Procedural DML can specify and retrieve each record from
a set of records. This retrieve of a record is said to be Record-at-a-time.
30. What is Set-at-a-time or Set-oriented?
Ans: The High level or Non-procedural DML can specify and retrieve many
records in a single DML statement. This retrieve of a record is said to be Set-at-
a-time or Set-oriented.
31. What is Relational Algebra?
Ans: It is procedural query language. It consists of a set of operations that take
one or two relations as input and produce a new relation.
32. What is Relational Calculus?
Ans: It is an applied predicate calculus specifically tailored for relational
databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA,
QUEL.
33. What is normalization?
Ans: It is a process of analysing the given relation schemas based on their
Functional Dependencies (FDs) and primary key to achieve the properties
• Minimizing redundancy
• Minimizing insertion, deletion and update anomalies.
34. What is Functional Dependency?
Ans: A functional dependency X → Y means that in any relation, if two tuples
have the same X values, they must also have the same Y values i.e if t1[X] = t2[X]
then they have t1[Y] = t2[Y]. So, X uniquely determines Y.
35. What is Lossless join property?
Ans: It guarantees that the spurious tuples generation does not occur with respect
to relation schemas after decomposition.
36. What is 1 NF (Normal Form)?
Ans: The domain of attribute must include only atomic (simple, indivisible)
values.
37. What is 2NF?
Ans: A relation schema R is in 2NF if it is in 1NF and every non-prime attribute
A in R is fully functionally dependent on primary key.
38. What is 3NF?
Ans: A relation schema R is in 3NF if it is in 2NF and for every FD X A either of
the following is true
X is a Super-key of R.
A is a prime attribute of R.
In other words, if every non-prime attribute is non-transitively dependent on
primary key.
39. What is BCNF (Boyce-Codd Normal Form)?
Ans: A relation schema R is in BCNF if it is in 3NF and satisfies an additional
constraint that for every FD X A, X must be a candidate key.
40. What is 4NF?
Ans: A relation schema R is said to be in 4NF if for every
multivalued dependency X Y that holds over R, one of following is
true X is subset or equal to (or) XY = R.
X is a super key.
41. What is 5NF?
Ans: A Relation schema R is said to be 5NF if for every join dependency {R1,
R2... Rn} that holds R, one the following is true i) Ri = R for some i.
ii) The join dependency is implied by the set of FD, over R in which the left side
is key of R.
42. What is Domain-Key Normal Form?
Ans: A relation is said to be in DKNF if all constraints and dependencies that
should hold on the constraint can be enforced by simply enforcing the domain
constraint and key constraint on the relation.
43. What are partial, alternate, artificial, compound and natural key?
Partial Key:
Ans: It is a set of attributes that can uniquely identify weak entities and that are
related to same owner entity. It is sometime called as Discriminator.
Alternate Key:
All Candidate Keys excluding the Primary Key are known as Alternate Keys.
Artificial Key:
If no obvious key, either stand-alone or compound is available, then the last resort
is to simply create a key, by assigning a unique number to each record or
occurrence. Then this is known as developing an artificial key.
Compound Key:
If no single data element uniquely identifies occurrences within a construct, then
combining multiple elements to create a unique identifier for the construct is
known as creating a compound key.
Natural Key:
When one of the data elements stored within a construct is utilized as the primary
key, then it is called the natural key.
44. What is meant by query optimization?
Ans: The phase that identifies an efficient execution plan for evaluating a query
that has the least estimated cost is referred to as query optimization.
45. What is join dependency and inclusion dependency?
Join Dependency:
Ans: A Join dependency is generalization of multivalued dependency. A JD {R1,
R2, ..., Rn} is said to hold over a relation R if R1, R2, R3, ..., Rn is a loss less join
decomposition of R. There is no set of sound and complete inference rules for JD.
Inclusion Dependency:
An Inclusion Dependency is a statement of the form that some columns of a
relation are contained in other columns. A foreign key constraint is an example of
inclusion dependency.
46.What is durability in DBMS?
Ans: Once the DBMS informs the user that a transaction has successfully
completed, its effects should persist even if the system crashes before all its
changes are reflected on disk. This property is called durability.
47.What is "transparent DBMS"?
Ans: It is one, which keeps its Physical Structure hidden from user.
48. What is a query?
Ans: A query with respect to DBMS relates to user commands that are used to
interact with a data base. The query language can be classified into data definition
language and data manipulation language.
49. What do you mean by Correlated sub query?
Ans: Subqueries return rows used by the main query. If the subquery runs
once per row of the main query, it’s called a correlated subquery. It can be
identified by references to parent query columns in its WHERE clause. The
following is a non-correlated subquery example.
E.g.
SELECT *
FROM CUST
WHERE '10/03/1990' IN (
SELECT ODATE
FROM ORDER
WHERE CUST.CNUM = ORDER.CNUM);
50. Name the buffer in which all the commands that are typed in are stored
Ans: Edit Buffer
51. What are the unary operations in Relational Algebra?
Ans: PROJECTION and SELECTION.
52. Are the resulting relations of PRODUCT and JOIN operation the same?
Ans: No.
PRODUCT: Concatenation of every row in one relation with every row in
another.
JOIN: Concatenation of rows from one relation and related rows from another.
53. Name the sub-systems of a RDBMS.
Ans: I/O, Security, Language Processing, Process Control, Storage Management,
Logging and Recovery, Distribution Control, Transaction Control, Memory
Management, Lock Management
54. Which part of the RDBMS takes care of the data dictionary? How?
Ans: Data dictionary is a set of tables and database objects that is stored in a
special area of the database and maintained exclusively by the kernel.
55. What is the job of the information stored in data-dictionary?
Ans: The information in the data dictionary validates the existence of the objects,
provides access to them, and maps the actual physical storage location.
56. Not only RDBMS takes care of locating data it also determines an optimal
access path to store or retrieve the data.
Ans: YES
57. How do you communicate with an RDBMS?
Ans: You communicate with an RDBMS using Structured Query Language
(SQL)
58. Define SQL and state the differences between SQL and other
conventional programming Languages
Ans: SQL is a nonprocedural language that is designed specifically for data
access operations on normalized relational database structures. The primary
difference between SQL and other conventional programming languages is that
SQL statements specify what data operations should be performed rather
than how to perform them.
59. Name the three major set of files on disk that compose a database in
Oracle
Ans: There are three major sets of files on disk that compose a database. All the
files are binary. These are
a. Database files
b. Control files
c. Redo logs
The most important of these are the database files where the actual data resides.

60. What are database files, control files and log files? How many of these
files should a database have at least? Why?
Ans: Database Files:
Database files store data and are usually large. One file is required, but multiple
are better for storage management. File size is fixed and doesn’t grow. File
location doesn’t affect data access.
Control Files:
Control files and redo logs support the database. Each database needs at least one
control file, but multiple are used for safety. Control files store database name,
creation time, file locations, and sync info. Any changes to database or redo log
files are recorded there.
Redo Logs:
Every database needs at least two redo logs. They record all changes and help
recover from failures without data loss. Redo logs are fixed in size and don’t
grow.
61. What is database Trigger?
Ans: A database trigger is a PL/SQL block that runs automatically on insert,
update, or delete actions. It can fire per statement or per row and can call other
PL/SQL procedures. Up to 12 trigger events are supported per table.
62. Name two utilities that Oracle provides, which are use for backup and
recovery.
Ans: Along with the RDBMS software, Oracle provides two utilities that you can
use to back up and restore the database.
63. What are stored-procedures? What are the advantages of using them?
Ans: Stored procedures are database objects that perform a user defined
operation. A stored procedure can have a set of compound SQL statements. A
stored procedure executes the SQL commands and returns the result to the client.
Stored procedures are used to reduce network traffic.

You might also like