0% found this document useful (0 votes)
300 views18 pages

Practice Questions For Theory - DBMS

This document contains 85 questions related to database management systems, including questions about database systems, database administrators, data abstraction, integrity rules, SQL, triggers, normalization, transactions, concurrency control, distributed databases, data modeling, and entity-relationship modeling. The questions cover theoretical and conceptual aspects of database management systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
300 views18 pages

Practice Questions For Theory - DBMS

This document contains 85 questions related to database management systems, including questions about database systems, database administrators, data abstraction, integrity rules, SQL, triggers, normalization, transactions, concurrency control, distributed databases, data modeling, and entity-relationship modeling. The questions cover theoretical and conceptual aspects of database management systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Database Management Systems

Practice Questions (Theory)

Q 1. What is a Database system?


Q 2. What is the role of Database Administrator ?
Q 3. Disadvantage in File Processing System?
Q 4. Describe the three levels of data abstraction?
Q 5. Define the "integrity rules"
Q 6. What do you mean by SQL ?What are the characteristics of SQL ?
Q 7. Explain Triggers and its types with examples.
Q 8. Distinguish between static and dynamic SQL.
Q 9. What is meant by static SQL? How it differs from dynamic SQL?
Q 10. How are the nulls represented in database system?
Q 11. What are aggregate functions?
Q 12. What is the purpose of group by clause in the SELECT statement?
Q 13. What are views? How they are created?
Q 14. What do you mean by integrity constraints ?
Q 15. Which subdivision of SQL is used to put values in tables and which one to create
tables ?
Q 16. Differentiate between SQL commands DROP TABLE and DROP VIEW.
Q 17. What is the difference between WHERE and Having Clause ?
Q 18. Discuss the various type of join operations ? Why are these join required.
Q 19. How are exceptions handled in PL/SQL? Give some of the internal exceptions' name

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

Q 22. Explain Canonical cover and Extraneous Attributes with examples.


Q 23. What do you understand by dependency preservation?
Q 24. What is the need of the normalization? Explain the first three steps involed in the
normalization.

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

Q 49. Explain Canonical cover and Extraneous Attributes with examples.


Q 50. What do you understand by dependency preservation?
Q 51. What is the need of the normalization? Explain the first three steps involed in the
normalization.
Q 52. What is database recovery? Why backups are important?

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.

Q 73. What do you mean by Hierarchical model ?


Q 74. What is an Entity?
Q 75. What is an Entity type?
Q 76. A municipality needs a database containing information concerning the inhabitants of
the municipality. The database will be used for the planning of schools, health care and
childcare. From the database, you should be able to receive answers to queries of the
following types:
_ How many boys and girls will start school during year x?
_ How many people will become old-age pensioners during year x?
_ How many households have more than x people?
_ How many people are single parents?
_ In how many households is at least one member unemployed?
_ How many households have a total income that is less than the norm for receiving
social benefits?
Develop an E/R model of the database, including attributes and primary
keys. Carefully consider the representation of “household” and “parent”.

Q 77. What is an Entity set?


Q 78. What is a composite attribute? Give examples.
Q 79. A company has several employees, all with different names, who perform interviews
with job applicants (one applicant is interviewed by one employee). The job applicants
also have different names. The interviewer makes appointments for interviews with the
applicants. Each applicant may be interviewed at several occasions, possibly by
different interviewers, but in that case the interviews take place during different days.
The company has special interview rooms. Each interviewer uses the same room for all
interviews during a day. A room may, however, be used by different interviewers
during a day, as long as the interviews don’t collide in time. The reservation of
interview appointments is to be computerized. The database developer has decided to
use a single relation for all data, with the following schema:
Interviews(interviewer, applicant, day, time, room)
a) From the text, find functional dependencies in the relation.
b) Find the keys of the relation.
c) Show that the relation is in 3NF but not in BCNF.
d) Decompose the relation in relations that are in BCNF.
e) Extra assignment: draw an E/R diagram that describes the system. Try to

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 87. What is an attribute?


Q 88. What is a Relation Schema and a Relation?
Q 89. What is degree of a Relation?
Q 90. What is Relationship, Relationship set, and Relationship type?
Q 91. What is degree of Relationship type?
Q 92. What is SDL (Storage Definition Language)?
Q 93. What is Data Storage - Definition Language?
Q 94. What is DDL, DCL, and DML (Data Manipulation Language)?
Q 95. 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 96. 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 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 99. 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 100. Which of the following is not true about removing rows from a table?

(A). You can use a subquery in a DELETE statement.


(B). Specific rows are deleted based on the WHERE clause
condition.
(C). A statement like, DELETE , would cause deletion of the table from
the database.
(D). All 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) A database design may be ambiguous.


B) Unrelated data should be in the same table so that updating the data will be easy.
C) It should avoid/reduce the redundancy.
D) An entity should not have attributes.
Q 115. …………. is a preferred method for enforcing data integrity
A) Constraints
B) Stored procedure
C) Triggers
Page 10 of 11
Page 11 of 11
D) Cursors
Q 116. ............... joins are SQL server default
A) Outer
B) Inner
C) Equi
D) None of the above
Q 117. The......................is essentially used to search for patterns in target string.
A) Like Predicate
B) Null Predicate
C) In Predicate
D) Out Predicate
Q 118. ................. requires that data should be made available to only authorized users.
A) Data integrity
B) Privacy
C) Security
D) None of the above
Q 119. ………………. First proposed the process of normalization.

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

Q 141. …………….. is used to determine whether of a table contains duplicate rows.


A). Unique predicate
B). Like Predicate C).
Null predicate
D). In predicate

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

You might also like