Practice Questions For Theory - DBMS
Practice Questions For Theory - DBMS
Q 20. What is 1NF, 2NF, 3NF and BCNF (Boyce-Codd Normal Form)?
Q 21. Explain Closure of Set of Functional dependency and Closure of Attribute sets
Page 1 of 11
Q 25. What are the different phases of transaction?
Q 26. What are the ACID properties of a transaction?
Q 27. What do you mean by isolation? Why is it important? Give an example.
Q 28. What do you mean by consistency? Why is it important? Give an example.
Q 29. What do you mean by atomicity? Why is it important? Give an example.
Q 30. What do you mean by durability? Why is it important? Give an example.
Q 31. List out the states of a transaction.
Q 32. Discuss the immediate update recovery technique is both single and multiuser
environment.
Q 33. Explain the purpose of checkpoint mechanism. How often should
checkpoints be performed
Q 34. List and explain various types of specialized locking techniques used in DBMS
Q 35. Why is concurrency control needed? Explain lost update, Inconsistent retrievals and
Uncommitted dependency anomalies.
Q 36. What is a deadlock ? How can a deadlock occur ? explain.
Q 37. Briefly explain one deadlock prevention algorithm.
Q 38. What if time stamping is used ? Explain briefly
Q 39. What is two-phase locking and how does it guarantee serializability ?
Q 40. Discuss the concurrency control mechanism in detail using suitable example.
Q 41. Differentiate between Two phase locking and Rigorous two-phase locking.
Q 42. How can deadlocks be avoided when using 2PL?
Q 43. How Share and exclusive locks differ ?Explain.
Q 44. How precedence graph can be used to detect deadlock ?
Q 45. What is a system log ? What is the purpose of the system log in system recovery ?
Q 46. What do you understand by distributed databases? Give the various advantages and
disadvantages of distributed database management system.
Q 47. What is 1NF, 2NF, 3NF and BCNF (Boyce-Codd Normal Form)?
Q 48. Explain Closure of Set of Functional dependency and Closure of Attribute sets
Page 2 of 11
Q 53. What are transaction logs?
Q 54. What do you mean by rollback?
Q 55. What is the difference between volatile and non volatile storage?
Q 56. What are redo and undo logs?
Q 57. What is a timestamp? State its advantages.
Q 58. What is shadow paging? State its advantages.
Q 59. What are the methods used to prevent the system from dead lock?
Q 60. What is database recovery? Why backups are important?
Q 61. Explain shadow paging recovery scheme in detail.
Q 62. What is extension and intension?
Q 63. What is Data Independence?
Q 64. What do you mean by Data processing ?
Q 65. Which part of the RDBMS takes care of the data dictionary? How
Q 66. A calendar program that allows users to browse each other’s calendars and to book
common appointments shall be developed. The program has a database which keeps
track of the users and their calendars.
You use the calendar to store data concerning appointments. An appointment starts
and ends at a given time on a given day and is described by a text. You may specify that
you wish to be reminded of an appointment. Reminders are of different kinds: a signal
in the computer’s loudspeaker, a pop-up window with the description of the meeting,
or an e-mail containing the description. You may, for each reminder, specify how long
before the appointment that you wish to be reminded.
Develop an E/R model of the database.
Q 67. What do you mean by instance & schema ? Explain the difference between these.
Q 68. What is the difference between Procedural DML and Non-Procedural DML ?
Q 69. What is a view? How it is related to data independence?
Q 70. What is Data Model?
Q 71. What is E-R model?
Q 72. A TV company wishes to develop a database to store data about the TV series that the
company produces. The data includes information about actors who play in the series,
and directors who direct the episodes of the series.
Actors and directors are employed by the company. A TV series are divided into
episodes. Each episode may be transmitted at several occasions. An actor is hired to
participate in a series, but may participate in many series. Each episode of a series is
directed by one of the directors, but different episodes may be directed by different
directors.
Examples of database queries:
_ Which actors play in the series Big Sister?
Page 3 of 11
Page 4 of 11
_ In which series does the actor Bertil Bom participate?
_ Which actors participate in more than one series?
_ How many times has the first episode of the series Wild Lies been transmitted? At
what times?
_ How many directors are employed by the company?
_ Which director has directed the greatest number of episodes?
Develop an E/R model of this system. Find attributes of the entity sets. Determine which
of the attributes that can be used as primary keys.
Page 5 of 11
Page 6 of 11
incorporate all dependencies from the text in the diagram (not easy).
Q 80. What is a single valued attribute? Give examples.
Q 81. What is a multi valued attribute? Give examples.
Q 82. What do you mean by cardinality? What are different kinds of cardinalities ?
Q 83. What is an Extension of entity type?
Q 84. What is the difference between the strong entity set and weak entity set ?
Q 85. Define subtype and supertype entities ?
Q 86. Give example of following relationships :
Many-to-One
One-to-One
One-to-Many
Many-to-Many
Q 97. Which of the following is true about inserting news rows to a table?
(A). You must list values in the default order of the columns in the table.
(B). You can also list the columns in the INSERT clause.
(C). You can use the INSERT statement to add rows from one table to
another.
(D). All of the above.
Q 98. Which of the following is not true about modifying rows in a table?
(A). Existing rows in a table are modified using the UPDATE
Page 7 of 11
statement.
(B). You can update more than one row at a time.
(C). All the rows in a table are modified if you omit the WHERE clause.
(D). None of the above.
Q 101. Which normal form is considered adequate for relational database design?
A). 2 NF
B). 3 NF
C). 4 NF
D). BCNF
Q 102. What operator tests column for the absence of data? A).
IS NULL operator
B). ASSIGNMENT operator
C). LIKE operator
D). NOT operator
Q 103. ................. is a statement that is executed automatically by the system.
A). trigger
B). assertion C).
durability
D). integrity constraint
Q 104. Reflexivity property says that X - Y is true if Y is ………………….
A) Subset of X
B) Null set of X
C) Super set of Y
D) Subset of Y
Q 105. In the............................mode any record in the file can be accessed at random
A) Sequential access
B) Random access
C) Standard access
D) Source access
Q 106. Which can be used to delete all the rows if a table?
A) Delete * from table_name
B) Delete from table_name
C) Delete table_name
Page 8 of 11
Page 9 of 11
D) all rows cannot be deleted at a time
Q 107. Which if the following is not the type of data integrity.
A) Key integrity
B) Domain integrity
C) Entity integrity
D) Referential integrity
Q 108. A.........................allows to make copies of the database periodically to help in the
cases of crashes & disasters.
A) Recovery utility
B) Backup Utility
C) Monitoring utility
D) Data loading utility
Q 109. ………………. Allows definitions and query language statements to be entered;
query results are formatted and displayed.
A) Schema Processor
B) Query Processor
C) Terminal Interface
D) None of the above
Q 110. …………….. is a utility to capture a continuous record of server activity and provide
auditing capability.
A) SQL server Profile
B) SQL server service manager
C) SQL server setup
D) SQL server wizard.
Q 111. Data items grouped together for storage purposes are called a
A) record
B) title
C) list
D) string
Q 112. …………. contains data assisting day to day activities of the organization.
A) Control database
B) Operational database
C) Strategic database
D) Sequential database
Q 113. SQL server stores index information in the....................system table
A) syst indexes
B) system indexes
C) sysind
D) sys indexes
Q 114. The one guideline to be followed while designing the database is
A) Edgar. W
B) Edgar F. Codd
C) Edward Stephen
D) Edward Codd
Q 120. For using a specific database......................command is used.
A) use database
B) database name use
C) Both A &B
D) None of them
Q 121. ………………… is a special type of integrity constraint that relates two relations &
maintains consistency across the relations.
A) Entity Integrity Constraints
B) Referential Integrity Constraints
C) Domain Integrity Constraints
D) Domain Constraints
E) Key Constraints
Q 122. ……………..specifies a search condition for a group or an aggregate.
A) GROUP BY Clause
B) HAVING Clause
C) FROM Clause
D) WHERE Clause
Q 123. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and
GRANT statements in a single transaction?
A) CREATE PACKAGE
B) CREATE SCHEMA
C) CREATE CLUSTER
D) All of the above
Q 124. In SQL, the CREATE TABLESPACE is used
A) to create a place in the database for storage of scheme objects, rollback segments,
and naming the data files to comprise the tablespace.
B) to create a database trigger.
C) to add/rename data files, to change storage
Page 12 of 11
D) All of the above
Page 13 of 11
Q 125. Which character function can be used to return a specified portion of a character
string?
A) INSTR
B) SUBSTRING
C) SUBSTR
D) POS
Q 126. Which of the following is TRUE for the System Variable $date$?
A) Can be assigned to a global variable.
B) Can be assigned to any field only during design time.
C) Can be assigned to any variable or field during run time.
D) Can be assigned to a local variable.
Q 127. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM EMP;
prints
A) 6789
B) 2345
C) 1234
D) 456789
Q 128. Which of the following SQL command can be used to modify existing data in a
database table?
A) MODIFY
B) UPDATE
C) CHANGE
D) NEW
Q 129. When SQL statements are embedded inside 3GL, we call such a program as ..........
A) nested query
B) nested programming
C) distinct query
D) embedded SQL
Q 130. ............... provides option for entering SQL queries as execution time, rather than at the
development stage.
A) PL/SQL
B) SQL*Plus
C) SQL
D) Dynamic SQL
Q 131. A primary key if combined with a foreign key creates
A. Parent-Child relationship between the tables that connect them
B. Many to many relationship between the tables that connect them
C. Network model between the tables that connect them
D. None of the above
Q 132. One aspect that has to be dealt with by the integrity subsystem is to ensure that only
valid values can be assigned to each data items. This is referred to as
A) Data Security
B) Domain access
C) Data Control
D) Domain Integrity
Q 133. Centralizing the integrity checking directly under the DBMS........................Duplication
and ensures the consistency and validity of the database.
A) Increases
B) Skips
C) Does not reduce
Page 14 of 11
D) Reduces
Page 15 of 11
Q 134. For like predicate which of the following is true.
i) % matches zero of more characters.
ii) _ matches exactly one character.
A) i-only
B) ii-only
C) Both of them
D) None of them
Q 135. In which of the following cases a DML statement is not executed? (A).
When existing rows are modified
(B). When some rows are deleted (C).
When a table is deleted
(D). All of the above
Q 136. Which of the following is not true about inserting news rows to a table?
(A). The INSERT INTO statement is used for inserting new rows to a table (B).
You cannot insert rows with NULL values to a table.
(C). You may insert a new row containing values for each column.
(D). All of the above.
Q 137. Which of the following is true about inserting news rows to a table?
(A). You must list values in the default order of the columns in the table. (B).
You can also list the columns in the INSERT clause.
(C). You can use the INSERT statement to add rows from one table to
another.
(D). All of the above.
Q 138. Which of the following is not true about modifying rows in a table?
(A). Existing rows in a table are modified using the UPDATE statement. (B).
You can update more than one row at a time.
(C). All the rows in a table are modified if you omit the WHERE clause.
(D). None of the above.
Q 139. Which of the following is true about modifying rows in a table?
(A). You can update some rows in a table based on values from another table.
(B). If you try to update a record related to an integrity constraint, it raises an error.
(C). You can modify multiple columns.
(D). All of the above.
Q 140. The candidate key is that you choose to identify each row uniquely is called
……………..
A). Alternate Key
B). Primary Key C).
Foreign Key
D). None of the above
Page 16 of 11
Page 17 of 11
Q 142. To eliminate duplicate rows..................................is used
A). NODUPLICATE B).
ELIMINATE
C). DISTINCT
D). None of these
Q 143. State true or false
i. A candidate key is a minimal super key.
ii. A candidate key can also refer to as surrogate key. A). i-
true, ii-false
B). i-false, ii-true
C). i-true, ii-true D).
i-false, ii-false
Q 144..................................is the process of organizing data into related tables.
A). Normalization
B). Generalization
C). Specialization
D). None of the above
Q 145. In........................., we have a strict parent-child relationship only.
(A) Hierarchical database
(B) Network databases
(C) Object oriented databases
(D) Relational databases
Page 18 of 11