CS8492-Database Management Systems-2017r Question Bank
CS8492-Database Management Systems-2017r Question Bank
QUESTION BANK
SUBJECT CODE:CS8492
SEM/YEAR: IV / II
DEPARTMENT :CSE
sets of attributes
o Sometimes called schema less or self-describing
o XML is widely used to represent this data model
15. Write the characteristics that distinguish the Database approach with the
File-based approach. (Apr/May 15)(Nov/Dec 16)
File-based System.
1. Separation and isolation of data
2. Duplication of data
3. Incompatible file formats
4. Data dependence
DataBase Systems
1. Control of data redundancy
2. Data consistency
3. Sharing of data
4. Improved data integrity
5. Improved security
16. What are the disadvantages of file processing system?(May/June 16)
The file processing system has the following major
disadvantages:
Data redundancy and inconsistency
Integrity Problems
Security Problems
Difficulty in accessing data
Data isolation.
23. What are aggregate functions? And list the aggregate functions supported by
SQL?
Aggregate functions are functions that take a collection of values as input and return
a single value. Aggregate functions supported by SQL are
Average: avg
Minimum: min
Maximum: max
Total: sum Count: count
24. What is the difference between char and varchar2 data type?
Char and varchar2 are data types which are used to store character values.
Char is static memory allocation; varchar2 is dynamic memory allocation.
26. Differentiate static and dynamic SQL. (Nov/Dec 14,15,16) (Apr/May 15)
Static SQL Static SQL
The SQL statements do not change each
time the program is run is called Static The SQL statements do not change each
SQL. time the program is run is called Static SQL.
Static SQL is compiled and optimized prior Static SQL is compiled and optimized prior
to its execution to its execution
The statement is prepared before the The statement is prepared before the
program is executed and the operational program is executed and the operational
form of the statement persists beyond the form of the statement persists beyond the
execution of the program. execution of the program
27. Why does SQL allow duplicate tuples in a table or in a query result? (Nov/Dec
15)
If key constraint is not set on a relation every result in a relation will be considered
as a tuple and hence SQL allows duplicate tuples in a table. Distinct keyword is
used to avoid duplicate tuples in the result.
28. Define: DDL, DML, DCL and TCL. (Nov/Dec 14,16)(Apr/May 15)
Create
Alter
Add
Modify
Drop
Rename
Drop
DML Commands:
Insert
Select
Update
Delete
DCL commands
Grant - Provide access privilege to user
Revoke - Get back access privilege from user
TCL commands
Commit
Rollback
Save point
UNIT-I / PART-B
Course File
Professor File
Registration file
Course
Student Number Number Date
Consider a suitable sample of tuples/records for the above mentioned tables and
write DML statements (SQL) to answer for the queries listed below.
1. Which courses does a specific professor teach?
2. What courses does specific professors?
3. Who teaches a specific course and where is his/her office?
4. For a specific student number, in which courses is the student registered and
what is his/her name?
5. Who are the professors for a specific student?
6. Who is the student registered in a specific course? (Apr/May 15)
UNIT-II / PART-A
UNIT-II / PART-B
1. ER model by taking Hospital management/Banking System/University Database as
case study(Nov/Dec 14)
2. Explain the various components of ER diagram with examples.
3. Discuss about (i) Data Models (ii) Mapping cardinalities. (Nov/Dec 14)
4. Explain functional dependency in database design with its properties.
5. Design an E-R diagram for keeping track of the exploits of your favourite sports
team. You should store the matches played, the scores in each match, the players in
each match and individual player statistics for each match. Summary statistics should
be modelled as derived attributes.
6. Construct an E-R diagram for a car insurance company whose customers own one or
more cars each. Each car has associated with it zero to any number of recorded
accidents. Each insurance policy covers one or more cars, and has one or more
premium payments associated with it. Each payment is for a particular period of time
set of customers, and the date when the payment was received. (Nov/Dec 16)
7. A car rental company maintains a database for all vehicles in its current fleet. For all
vehicles, it includes the vehicle identification number, license number, manufacturer,
model, date of purchase, and color. Special data are included for certain types of
vehicles.
• Trucks: cargo capacity.
• Sports cars: horsepower, renter age requirement.
• Vans: number of passengers.
• Off-road vehicles: ground clearance, drivetrain (four- or two-wheel drive).
Construct an ER model for the car rental company database. (Nov/Dec 15)
8. State the need for Normalization of a Database and Explain the various Normal
Forms (1st, 2nd, 3rd, BCNF, 4th, 5th and Domain- Key) with suitable examples.
(Apr/May 15)(Nov/Dec 14,16)
9. Draw E – R Diagram for the “Restaurant Menu Ordering System”, which will
facilitate the food items ordering and services within a restaurant. The entire
restaurant scenario is detailed as follows. The Customer is able to view the food items
menu, call the waiter, place orders and obtain the final bill through the computer kept
in their table. The waiters through their wireless tablet PC are able to initialize a table
for customers, control the table functions to assist customers, orders, send orders to
food preparation staff (chef) and finalize the customer’s bill. The food preparation
staffs (Chefs), with their touch-display interface to the system, are able to view orders
sent to the kitchen by waiters. During preparation, they are able to let the waiter know
the status of each item, and can send notification when items are completed. The
system should have full accountability and logging facilities, and should support
supervisor actions to account for exceptional circumstances, such as a meal being
refunded or walked out on.(Apr/May 15)
10. For the ER diagram given below explain ER to Relational mapping procedures.
UNIT III TRANSACTIONS
UNIT-III/ PART-A
4. Differentiate strict two phase locking protocol and rigorous two phase locking
protocol.(May/June 16)
In strict two phases locking protocol all exclusive mode locks taken by a
transaction is held until that transaction commits.
Rigorous two phase locking protocol requires that all locks be held until the
Transaction commits.
7. What are the time stamps associated with each data item?
W-timestamp (Q) denotes the largest time stamp if any transaction that
executed WRITE(Q) successfully.
R-timestamp (Q) denotes the largest time stamp if any transaction that executed
READ (Q) successfully.
8. Define blocks?
The database system resides permanently on nonvolatile storage, and is partitioned
into fixed-length storage units called blocks.
9. Define deadlock?
Neither of the transaction can ever proceed with its normal execution. This situation is
called deadlock
21. What are the properties of transaction? Or Write the ACID properties of
Transaction. (Nov/Dec 14) (Apr/May 15)(May/June 16)
Atomicity , Consistency, Isolation and Durability
UNIT-III / PART-B
1. What is B-Tree?
A B-tree eliminates the redundant storage of search-key values.
It allows search key values to appear only once.
8. What is an index?
An index is a structure that helps to locate desired records of a relation quickly,
without examining all records
9. What are the factors to be taken into account when choosing a RAID level?
Monetary cost of extra disk storage requirements.
Performance requirements in terms of number of I/O operations
Performance when a disk has failed and Performances during rebuild.
14. What are the ways in which the variable-length records arise in database
systems?
Storage of multiple record types in a file, Record types that allow variable lengths for
one or more fields, Record types that allow repeating fields.
15. What are the two types of blocks in the fixed –length representation? Define
them.
Anchor block: Contains the first record of a chain.
Overflow block: Contains the records other than those that are the first record of a
chain.
20. Differentiate static and dynamic hashing. (Apr/May 15) (Nov/Dec 14,15)
Query optimization refers to the process of finding the lowest cost method of
evaluating a given query.
The query optimizer attempts to determine the most efficient way to execute a given
query by considering the possible query plans.
UNIT-IV / PART-B
UNIT-V / PART-A
14. Can we have more than one constructor in a class? If yes, explain the need for
such a situation. (Nov/Dec 15)
Yes, default constructor and constructor with parameter
key ssn)
{ ... ... }
class Faculty extends Person ENTRY POINTS
( extent faculy )
{ ... ... }
class
Department
( extent departmet key dname){ ... ... }
18. How does the concept of an object in the object-oriented model differ from the
concept of an entity in the entity-relationship model?(Nov/Dec 16)
An entity is simply a collection of variables or data items. An object is an
encapsulation of data as well as the methods (code) to operate on the data. The data
members of an object are directly visible only to its methods. The outside world can
gain access to the object’s data only by passing pre-defined messages to it and these
messages are implemented by the methods.
19. Is XML Hierarchical?
XML documents have a hierarchical structure and can conceptually be interpreted as
a tree structure, called an XML tree. XML documents must contain a root element
(one that is the parent of all other elements). All elements in an XML document can
contain sub elements, text and attributes.