DBMS Course File
DBMS Course File
DBMS Course File
DATABASE
MANAGEMENT SYSTEMS
For
B. TECH (CSE) 2nd YEAR – 2st SEM (R18)
2022-23 (SEM-II)
by
MOGILI SIVA
Assistant Professor
Departmentof
CSE(DATA SCIENCE)
CONTENTS
VISION
"To evolve into a center of excellence in Science & Technology through creative and
innovative practices in teaching-learning, promoting academic achievement & research
excellence to produce internationally accepted competitive and world class professionals
who are psychologically strong and emotionally balanced imbued with social consciousness
and ethical values."
MISSION
"To provide high quality academic programs, training activities, research facilities and
opportunities supported by continuous industry - institute interaction aimed at
employability, entrepreneurship, leadership and research aptitude among students and
contribute to the economic and technological development of the region, state and nation."
DEPARTMENT VISION MISSION
VISION
MISSION
To strengthen links with industry through collaborative partnerships in research & product
development and student internships.
Introduction to the Relational Model: Integrity constraint over relations, enforcing integrity
constraints, querying relational data, logical data base design, introduction to views,
destroying/altering tables and views. Relational Algebra, Tuple relational Calculus, Domain
relational calculus.
UNIT - III
Data on External Storage, File Organization and Indexing, Cluster Indexes, Primary and
Secondary Indexes, Index data Structures, Hash Based Indexing, Tree base Indexing,
Comparison of File Organizations, Indexes and Performance Tuning, Intuitions for tree
Indexes, Indexed Sequential Access Methods (ISAM), B+ Trees: A Dynamic Index Structure.
TEXT BOOKS:
COURSE OBJECTIVES
1. To understand the basic concepts and the applications of database systems.
3. Topics include data models, database design, relational model, relational algebra,
transaction control, concurrency control, storage structures and access techniques.
COURSE OUTCOMES
After completion of this course students will be able to
1. Gain knowledge of fundamentals of DBMS, database design and normal forms
2. Master the basics of SQL for retrieval and management of data
3. Be acquainted with the basics of transaction processing and concurrency control
4. Familiarity with database storage structures and access techniques.
COURSE OUTCOME MAPPING WITH PO’S AND
PSO’S
CO – PO MAPPING:
CO – PSO MAPPING:
QUESTION BANK
For ALL 5 UNITS
DESCRIPTIVE & OBJETIVE QNS
COURSE: B. Tech (AI&DS) II Year – II Semester (R18)
QNO Description of Question Mark CO BTL
s PO
a What is a relation? 2M 2 2 1
What are statements used to update and alter the table
b 3M 2 1 1
1 contents?
What is an integrity constraint? Explain the different
c types of integrity constraints over relations with 10M 2 2 2
examples?
What are the SQL statements are used to retrieve and
a 2M 2 1 2
modify the database?
2 b Demonstrate on altering tables and views 3M 2 1 2
Explain the fundamental operations in relational algebra
c 10M 2 2 2
with examples.
a Define the terms Arity and Cardinality of a Relation 2M 2 1 1
b 3M 2 2 2
3 c Explain about Logical Database Design 5M 2 3 2
Differentiate between Tuple Relational Calculus and
d 5M 2 3 4
Domain Relational calculus
Define the terms primary key constrains and foreign key
a 2M 2 2 1
and check constraints.
Differentiate between relational algebra and relational
b 3M 2 2 4
calculus
Consider the following relations
Sailors((sid,sname,rating,age)
Boats(bid,bname,color)
Reserves(sid,bid,day)
Write the statements in Relational Algebra, Relational
4 Calculus, Domain relational Calculus, and SQL for the
following questions
c i)Find names of sailors who have reserved a RED boat 10M 2 2 3
ii)Find the names of sailors who have reserved at least one
boat
iii)Find the names of sailors who have reserved a Red and
a Green boat
iv) Find the names of sailors who have reserved a Red or
a White boat
v) Find the names of sailors who have reserved all boats
5 a Explain various Domain constraints in SQL with examples 2M 2 2 2
What is view? How to specify a View? Write about view
b 3M 2 3 2
implementation techniques?
c Explain about domain relational calculus with example 5M 2 2 2
d Explain about Tuple relational calculus with example 5M 2 1 2
a Discuss the functionality of query evaluation engine. 2M 2 4 1
When are integrity constraints enforced by a DBMS?
b 3M 2 1 1
What is referential integrity? Explain with examples.
6
c Explain about outer join operation in relational algebra 5M 2 2 1
Explain modification of the database operations in
d 5M 2 2 1
relational algebra with example
a Explain Generalized projection in Relational Algebra 2M 2 1 2
Differentiate between a relation schema and relation
b 3M 2 2 4
instance. Define the term arity and degree of a relation
a What are NULL values? Can primary key fields of table contain 2M 3 1 1
null values?
UNIT-4
QNO Description of Question Mar Cou Progra BT
ks rse m L
outc Outco
ome me(PO
(CO )
)
a What is transaction? Explain its states 2M 4 1 1
b What do you mean by serializability of a schedule? 3M 4 2 1
1 c Explain the ACID Properties of transactions. 5M 4 2 2
How to test serializability of a schedule? Explain with an
d example. 5M 4 3 3
UNIT-5
QNO Description of Question Mar Cou Progr BTL
ks rse am
outc Outco
ome me(P
(CO O)
)
a What is primary and secondary indexing? 2M 5 2 1
1 What is the difference between dense index and sparse
b 3M 5 2 1
index
c List and explain various file organization methods 10M 5 1 1
a What is meant by linear hashing? 2M 5 2 1
b What is an index on a file of records? Why is it needed? 3M 5 1 1
2
Explain about Static Hashing and Extendable Hashing with
c 10M 5 2 2
examples
a What is difference between Indexing and hashing? 2M 5 1 1
b What are the features of B+ trees? 3M 5 2 2
3
Explain deletion and insertion operation in B+ trees with
c 10M 5 1 2
example?
What is the main difference between ISAM and B+ tree
a 2M 5 1 1
indexes?
Demonstrate with an example insertion operation in B+ tree
4 b 3M 5 2 2
for the values 8, 11, 2, 6, 18, 22, 17.
Explain Deletion and insertion operations in ISAM with
c 10M 5 3 2
example.
a Explain about cluster index 2M 5 4 2
b What is the order of B+ tree? 3M 5 2 1
5
Explain deletion and insertion operations in linear hashing
c 10M 5 1 2
with examples.
a What is Static Hashing 2M 5 1 1
Construct a B+ tree to insert the following key elements
b 3M 5 2 6
6 (order of the tree is 4) 1,4,7,10,17,21,31,25,19,20,28,42
Compare and contrast Hash based indexing and tree based
c 10M 5 1 2
indexing
a What is hashing? 2M 5 1 1
b Describe examples of B+ trees. 3M 5 2 2
Explain about cluster index, primary and secondary indexes
7 c 5M 5 1 2
with examples
d 5M 5 1 2
Explain Indexed Sequential Access Method.
Why are tree structure indexes are good for searches,
a 2M 5 1 1
especially range selections
What are the main difference between static and dynamic
8 b 3M 5 1 1
index structure?
c Explain static hashing. 5M 5 2 2
d Explain Extendible hashing. 5M 5 2 2
a What is Indexing and Hashing? 2M 5 1 1
What is the main difference between static and dynamic
9 b 3M 5 1 1
hashing?
c Draw the structure of B+ tree. Explain its operations. 10M 5 2 3
a What is local depth? 2M 5 1 1
b Differentiate clustered and un-clustered index 3M 5 2 4
10
What is Hashing? Discuss the relation between extendable
c 10M 5 1 1
hashing and Linear Hashing. What are their relative merits?
UNIT-1
Objective Questions
1. _____ is a collection of interrelated data and a set of programs to access those data. [ ]
A).Data B).Data set C).Database D).DBMS
2. A _________ is a language that enables users to access or manipulate data as organized by the
appropriate data model. [ ]
A).DDL B).DML C).DCL D). TCL
6.Which of the following indicates the maximum number of entities that can be involved in a
relationship? [ ]
A) Minimum cardinality B) Maximum cardinality C) ERD D) Greater Entity Count
10. ____________ means to hide certain details of how data is stored and maintain. [ ]
A) Data Abstraction B) Data Integrity C) Data Isolation D)All
Unit-1 Key:
1. D 11. Physical Level
2. B 12. Logical
3. A 13. Mapping Cardinality
4. B 14. database independence
5. B 15. Entity set
6. B 16. Double line
7. B 17. Specialization
8. C 18. Weak
9. D 19. data dictionary
10. A 20. One to one
UNIT-2
Objective Questions
1. What is a view? [ ]
a) A view is a special stored procedure executed when certain event occurs
b) A view is a virtual table which results of executing a pre-compiled query
c) A view is a database diagram
d) None of the Mentioned
5. With SQL, how do you select all the records from a table named “Persons” where the value of
the column “FirstName” ends with an “a”? [ ]
a) SELECT * FROM Persons WHERE FirstName=’a’
b) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
c) SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
d) SELECT * FROM Persons WHERE FirstName=’%a%’
6. With SQL, how can you return all the records from a table named “Persons” sorted descending
by “FirstName”? [ ]
a) SELECT * FROM Persons SORT BY ‘FirstName’ DESC
b) SELECT * FROM Persons ORDER FirstName DESC
c) SELECT * FROM Persons SORT ‘FirstName’ DESC
d) SELECT * FROM Persons ORDER BY FirstName DESC
9. Inorder to ensure that the value of budget is non-negative which of the following should be
used?
a) Check(budget>0)
b) Check(budget<0)
c) Alter(budget>0)
d) Alter(budget<0)
10 Which one of the following uniquely identifies the elements in the relation? [ ]
a) Secondary Key b) Primary key c) Foreign key d) Composite key
11. Which of the following operation is used for retrieving certain columns of a table?
[ ]
12. In Relational model, data and relationships are represented as a collection of ________.
13. .___________ key is used to represent relationship between tables.
14. The degree of the relation is also called as __________.
15. In relational algebra cross product is also called as _____________.
16. The operator that is used for pattern matching in SQL is _________.
17. The SQL statement that is used to delete a particular column in a relation/table is _______.
18. Using the select operation, you can select ___ that satisfy certain criteria.
19. A list of the attributes we wish to appear in the result is displayed in ___ operation.
20. If there are 2 types of tuples, A & B, the ___ operation contains all the tuples that are either
in A or B or both in A & B.
21.The Tuple Relational calculus is a _______________________Query Language.
Unit-2 Key:
1. B 11. C
2. A 12. inter-related tables
3. D 13. Foreign
4. A 14. Arity
5. C 15. Cartesian Product
6. D 16. LIKE
7. B 17. Alter
8. B 18. Tuples
9. A 19. Project
10. B 20. A U B
21. Non Procedural
UNIT-3
1.Tables in second normal form (2NF): [ ]
a) Eliminate the possibility of a insertion anomalies b) Have a composite key
c)Eliminate all partial dependencies d) Have all non-key fields depend on the whole primary
key
2.Which forms simplifies and ensures that there is minimal data aggregates and repetitive [ ]
groups:
a)2 NF b)3 NF c) 1 NF d)1,2 and 3 NF
7. If we have not specified ASC or DESC after a SQL ORDER BY clause, the following is used
by default [ ]
a)DESC b)ASC c)There is no default value d)None of the mentioned
11.The domain of attribute must include only atomic (simple, indivisible) values is called_____
12.A relation schema R is in ____ if it is in 1NF and every non-prime attribute A in R is fully
functionally dependent on primary key.
13._____ is based on the concept of transitive dependent.
14.If every non-prime attribute A in R is fully functionally dependent on the primary key
attribute of R,then R is said to be in ______
15.In __________ normal form, a composite attribute is converted to individual attributes.
16. ________________occurs when one copy of repeated data is updated, an inconsistency is
created unless all copies are similarly updated.
17. An_______________ is a predicate expressing a condition that we wish the database always
to satisfy.
18. A table is in 3NF if it is in 2NF and if it has no ______ dependencies
19. _______________ operator tests column for absence of data
20. ______________________aggregate function is used to retrieve minimum value.
Unit-3 Key:
1. C 11. 1 NF
2. B 12. 2 NF
3. D 13. 3 NF
4. B 14. 2 NF
5. A 15. 1 NF
6. D 16. Data redundancy
7. B 17. Assertion
8. C 18. transitive
9. B 19. IS NULL
10. C 20. MIN
UNIT-4
2.In order to maintain transactional integrity and database consistency, what technology does a
DBMS deploy? [ ]
5.If the access is read only then the following commands are not to be executed [ ]
a) Insert, Update &Delete b) Insert c)Update d)Delete
6. If we need to update the objects we must first upgrade to an [ ]
a) Exceptional b) Shared locks c) Exclusive d) Request lock
7. Any changes that the aborted transaction made to the database must be undone is_____[ ]
a) Commit b) Partial Commit c) Transaction rollback d) Failure
8. In a granularity hierarchy the highest level represents the [ ]
a) Entire database b) Area c) File d) Record
9 ____denotes the largest timestamp of any transaction that executed write(Q) successfully.[ ]
a) W-timestamp(Q) b) R-timestamp(Q) c) RW-timestamp(Q) d) WR-timestamp(Q)
10. The ____ requires that each transaction Ti executes in two or three different phases in its
lifetime, depending on whether it is a read-only or an update transaction. [ ]
a) Validation protocol b) Validation-based protocol
c) Timestamp protocol d) Timestamp-ordering protocol
Fill in the blanks:
11.The ____is the average time for a transaction to be completed after it has been submitted.
12.The two types of serializability are _____ and _____
13. _____is the most common used to implement the requirement is to allow a transaction to access a data item
only if it is currently holding a lock on that item.
14. The modes of lock are _____and ____
15. ______phase is a transaction that obtains locks but does not release any lock.
16. ______phase is a transaction that releases locks but may not obtain any new locks.
17. _____is a mechanism for conversion from shared lock to exclusive lock
18. _____ is a mechanism for conversion from exclusive lock to shared lock
19. _________ states that only valid data will be written to the database.
20. __________means that the data used during the execution of a transaction cannot be used
by a second transaction until the first one is completed.
Unit-4 Key:
1. A 11. Average Response Time
2. B 12. Conflict serializability and View
3. D serializability
4. A 13. Shared Lock
5. A 14. Shared& Exclusive
6. C 15. Growing
7. C 16. Shrinking
8. A 17. Upgrade
9. A 18. Degrade
10. A 19. Consistency
20. Isolation
UNIT-5
1. Who can take steps to tune recover subsystems [ ]
a) Client b) DBA c) System Analyst d) Application programmer
5.The height of the B+ tree with only leaf level and a single index level is [ ]
a)4 b)2 c)1 d)3
8.The file organization that provides very fast access to any arbitrary record of a file is [ ]
a)Unordered file b)Hashed file c)Ordered file d)B-tree
11.A lock that allows concurrent transactions to access different rows of the same table is known as
a_____
12.A file organization in which the data records are ordered in same way as data entries in index is
called _______
13.A file organization in which the data records are ordered in different way as data entries in index is
called _______
14.A ______ is an index on a set of files which includes the primary key
15.An index that is not a primary key index is called a _______
16.______ is simplest file organization and stores the files in the order they arrive
17.______ is simplest file organization and stores the files in the order they arrive
18.______ are not organized sequentially, instead they are arranged randomly
19.______ enhance the performance of DBMS
20.Unit of information being transferred between main memory and a disk is called _____
Unit-5 Key:
1. B
2. C
3. A
4. A
5. C
6. B
7. C
8. B
9. C
10. B
11. Row level Lock
12. Clustered
13. Un-clustered
14. Primary index
15. Secondary index
16. Heap file
17. Unordered file
18. Hash file
19. Indexes
20. Page
37
38
PREVIOUS YEAR UNIVERSITY QUESTION
PAPER
39