112382
112382
17. Define: DDL, DML, DCL and TCL. (Dec 14,16,May 15)
DDL COMMANDS:
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
19. Define the terms Entity set and Relationship set (May 19, May 22)
An entity is represented by a set of attributes. Attributes are descriptive properties possessed by
each member of an entity set. A relationship set is a set of relationships of same type.
20. What are the various types of keys in the database? (Dec 20,May 21)
There are mainly Eight different types of Keys in DBMS and each key has it’s different
functionality:
1. Super Key
2. Primary Key
3. Candidate Key
4. Alternate Key
5. Foreign Key
6. Compound Key
7. Composite Key
UNIT-I / PART-B
1. List out the disadvantages of File system over DB & explain it in detail.
2. List out the operations of the relational algebra and explain with suitable examples.(Dec 16)
3. Sketch the typical component modules of DBMS. Indicate and explain the interactions between
those modules of the system (May 22)
i) With the help of a neat block diagram explain the basic architecture of a database
management system. (Dec 15,20,May 16,21)
ii) What are the advantages of having a centralized control of data? Illustrate your answer with
suitable example. (Dec 15)
5. Explain about data definition language and data manipulation language in SQL with
examples.(Dec 14,June 16)
Describe the following with examples
i) 1) DDL. (2) DML.
(ii) Write a note on aggregate functions (May 22)
6. Explain about SQL Fundamentals.(May 16)(or) What are the several parts of SQL query
language ? What are the basic built in types used during SQL create statement? State and given
example for the basic structure of SQL queries. (Dec 20 ,May 21)
7. Describe the six clauses in the syntax of an SQL query, and show what type of constructs can
be specified in each of the six clauses. Which of the six clauses are required and which are
optional? (Dec 15)
8. Explain the three different groups of data models in with suitable examples.(May 19))
10. Consider the schema given in the above question and write the following queries in SQL
1. Find the names of suppliers who supply some red part
2. Find the sids of suppliers who supply some red part and some green part
3. Find the sids of suppliers who supply every red part
4. Find the pids of parts supplied by atleast two different suppliers (Dec 19)
11. Consider a student registration database comprising of the below given table schema.
Student File
Student Number Student Name Address Telephone
Course File
Course Number Description Hours Professor Number
Professor File
Professor Number Name Office
Registration file
Student Number Course 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? (May 15)
13. Explain the following terms briefly : attribute, domain, entity relationship, entity set,
relationship set, one-to-many relationship, many-to-many relationship, participation
constraint, overlap constraint, covering constraint, weak entity set, aggregation and role
indicator (Dec 20,May 21)
16. 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. (Dec 16)
17. 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. (Dec 15, May 22)
18. Consider the following information about a university database:
i. Professors have an SSN, a name, an age, a rank, and a research specialty.
ii. Projects have a project number, a sponsor name (e.g., NSF), a starting date, an ending date,
and a budget.
iii. Graduate students have an SSN, a name, an age, and a degree program (e.g., M.S. or Ph.D.).
iv. Each project is managed by one professor (known as the project’s principal investigator).
v. Each project is worked on by one or more professors (known as the project’s co-
investigators).
vi. Professors can manage and/or work on multiple projects.
vii. Each project is worked on by one or more graduate students (known as the project’s
research assistants).
viii. When graduate students work on a project, a professor must supervise their work on the
project. Graduate students can work on multiple projects, in which case they will have a
(potentially different) supervisor for each one.
ix. Departments have a department number, a department name, and a main office.
x. Departments have a professor (known as the chairman) who runs the department.
xi. Professors work in one or more departments, and for each department that they work in, a
time percentage is associated with their job.
xii. Graduate students have one major department in which they are working on their degree.
xiii. Each graduate student has another, more senior graduate student (known as a student
advisor) who advises him or her on what courses to take.
Design and draw an ER diagram that captures the information about the university.
Use only the basic ER model here, that is, entities, relationships, and attributes.
Be sure to indicate any key and participation constraints (Dec 19)
19. 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. (May 15)
(May 19)
7. Consider the following relations :
Sailors (sid:integer, sname:string, rating:integer, age:real)
Boats (bid:integer, bname:string, color:string)
Reserves(sid:integer, bid:integer, day:date) (Dec 20,May 21)
Write the SQL statement for the following queries :
i. Find all sailors with a rating above 7.
ii. Find the sids of sailors who have reserved a red boat.
iii. Find the colors of boats reserved by lubber.
iv. Find the names of sailors who have reserved at least one boat.
8. Write short notes on following
i. Loss less decomposition
ii. Dependency Preserving
9. Explain the following
i) Multivalue dependency
ii) Join dependency
10. With relevant example discuss the various operations in relational algebra
34. Brief any two violations that may occur if a transaction executes a lower isolation level
than serializable. (Dec 19, May 22)
If a transaction executes a lower isolation level than serializable, occurring violations are
Lost-update anomaly ,Dirty-Write anomaly
Dirty-Read anomaly, Non-Repeatable read anomaly
Phantom Read anomaly, Write skew anomaly
35. What benefit does strict two-phase locking provide? What are the disadvantages of it? (Dec
20 ,May 21)
A transaction is said to follow Two Phase Locking protocol if Locking and Unlocking can be
done in two phases.
Growing Phase: New locks on data items may be acquired but none can be released.
Shrinking Phase: Existing locks may be released but no new locks can be acquired.
Disadvantages
The greatest disadvantage of the two-phase commit protocol is that it is a blocking protocol. If
the coordinator fails permanently, some participants will never resolve their transactions: After
a participant has sent an agreement message to the coordinator, it will block until a commit or
rollback is received.
36. What are different isolation levels in database?
Serializable.
Repeatable reads.
Read committed.
Read uncommitted.
Dirty reads.
Non-repeatable reads.
Phantom reads.
37. List the responsibilities of a DBMS has whenever a transaction is submitted to the
system for execution? (Dec 19)
Whenever a transaction is submitted to a DBMS for execution, the system is responsible for
making sure that either:
1.All the operations in the transaction are completed successfully and the effect is recorded
permanently in the database; or
2. The transaction has no effect whatsoever on the database or on any other transactions.
The DBMS must not permit some operations of a transaction T to be applied to the
database while other operations of T are not. This may happen if a transaction fails after
executing some of its operations but before executing all of them.
UNIT-III / PART-B
1. Discuss view serializability and conflict serializability (Dec 15)
2. Write short notes on Transaction State and discuss the properties of transaction.
3. Briefly describe two phase locking in concurrency control techniques. (Dec 14,16)
4. Explain the concepts of concurrent execution in Transaction processing system. (Dec 14)
5. Explain Transaction concept with an example. (Dec 14)
What is a transaction? With a neat sketch describe the states of a transaction (May 22)
6. Explain about dead lock recovery algorithm with an example.
7. Explain the concurrency problem with example
8. What are the two approaches of deadlock prevention? Explain in detail with suitable
example. (Dec 20,May 21)
Define deadlock. Examine deadlock prevention and detection (May 22)
9. What is concurrency control? How is it implemented in DBMS? Illustrate with a suitable
example. (Dec 14)
10. Briefly explain about Two phase commit and three phase commit protocols. (Apr/May 15) (May/June 16)
(Dec 14)
11. What is deadlock? How does it occur? How transactions be written to (i) Avoid deadlock (ii)
guarantee correct execution. Illustrate with suitable example. (Dec 14,15,16)
12. Explain about Locking Protocols. (May 16)
13. State and explain the transaction isolation level. (Dec 20,May 21)
14. Discuss in detail about the testing of serializability. (May 19)
15. Explain deferred and immediate modification versions of log-based recovery Scheme (May
19)
16. Discuss in detail about the ACID properties of transaction (May 19)
17. What is concurrency control? How it is implemented in DBMS? Briefly elaborate with
diagrams and examples. (May 19)
18. Consider the following extension to the tree-locking protocol, which allows both shared and
exclusive locks:
• A transaction can be either a read-only transaction, in which case it can request only shared
locks, or an update transaction, in which case it can request only exclusive locks.
• Each transaction must follow the rules of the tree protocol. Read-only transactions may lock
any data item first, whereas update transactions must lock the root first. Show that the protocol
ensures serializability and deadlock freedom. (Dec 16)
19. Consider the following schedules. The actions are listed in the order they are schedule, and
prefixed with transaction name.
S1: T1: R(X), T2: R(x), T1: W(Y), T2: W(Y), T1: R(Y), T2: R(Y)
S2:T3: R(X), T1: R(X), T1: W(Y), T2: R (Z), T2: W (Z), T3: R (Z)
For each of the schedules, answer the following questions:
i. What is the precedence graph for the schedule?
ii. Is the schedule conflict-serializable? If so, what are all the conflict equivalent serial
schedules?
iii. Is the schedule view-serializable? If so, what are all the view equivalent serial
schedules? (May 15)
20. Discuss elaborately the two-phase locking protocol that ensures serializability.
ii) Brief the states of a transaction with a neat diagram (Dec 19)
21. What can you say about
(i) serial, non-serial schedules
(ii) conflict-serializable and view serializable (May 22)
22. Explain the concurrency problem with example. (May 22)
23. i) Narrate the actions that are considered for deadlock detection and the recovery from
deadlock
ii) Discuss the properties of a transaction that ensure integrity of data in the database system.
(Dec 19)
30. What are the factors needed to evaluate the technique of ordered indexing and hashing?
(Dec 20,May 21)
Indexing techniques are evaluated on the basis of
Access types
Access time
Insertion time
Deletion time
Space overhead
Hashing performance: can be evaluated under the assumption that each key is equally likely
and uniformly hashed to any slot of hash table.
31. A B+ tree with the following specifications, block size 1 KB, block, key and data record pointer of 6
bytes, 9 bytes and 7 bytes long respectively. Compute order of the leaf node? (May 22)
Disk Block size = 1024 bytes
Data Record Pointer size, r = 7 bytes
Key size,k = 9 bytes
Disk Block ptr, b = 6 bytes
n* k(key size)+ n* r(record pointer size) + b = block size
9n+7n+6=1024
16n=1024-6
16n=1018
N=63
UNIT-IV / PART-B
1. Describe File Organization.
2. Define RAID and Explain in detail about RAID technology with suitable diagrams. (Dec 14, 15,
16,May 15,16 19,22)
3. Explain Secondary storage devices.
4. Explain about static and dynamic hashing with an example. (Dec 20,May 21)
5. What is the need for parallel database? Specify the two performance metrics for parallel
database. Discuss in brief about various architecture models for parallel database. (May 22)
6. Explain about ordered indices with an example
7. Explain about B+ trees indexing concepts with an example (Dec 14,May 16)
8. Explain about B trees indexing concepts with an example (Dec 14)
9. Illustrate indexing and hashing techniques with suitable examples. (Dec 15)
10. Explain about Query optimization with neat Diagram. (Dec 14,16)
11. Describe the structure of B+ tree and give the algorithm for search in the B+ tree with example.
(May 19).
12. Give a detailed description about Query processing and Optimization. Explain the cost
estimation of Query Optimization (Dec 14).
13. Discuss about join order optimization and heuristic optimization algorithm. (May 15)
14. Briefly explain about Query Processing (May 16)
Sketch and concise the basic steps in query processing (May 22)
15. i) Explain the various levels of RAID systems
ii) Why data dictionary storage is important (Dec 19)
16. i) With simple algorithms explain the computing of nested loop join and block nested loop join
ii) Sketch and concise the basic steps in query processing. (Dec 19)
17. Describe the procedure for index update for single level indices with example. (Dec 20,May 21)
18. Construct a B+ tree for the following set of key values : (2, 3, 5, 7, 11, 17, 19, 23, 29, 31) assume
that the tree is initially empty and values are added in ascending order. construct B+ trees for
the cases where the number of pointers that will fit in one node is as follows : a) Four b) six c)
Eight (Dec 20,May 21)
UNIT V ADVANCED TOPICS
Distributed Databases: Architecture, Data Storage, Data Fragmentation - Replication and
Allocation Techniques for Distributed Database Design. Distributed Databases: Architecture,
Data Storage, Transaction Processing – Object-based Databases: Object Database Concepts,
Object-Relational features, ODMG Object Model, ODL, OQL - XML Databases: XML Hierarchical
Model, DTD, XML Schema, XQuery.
UNIT-V / PART-A
1. What is homogeneous distributed database and heterogeneous distributed database
Compare Homogeneous and Heterogeneous Distributed database (May 22)
A homogeneous distributed database has identical software and hardware running all
databases instances, and may appear through a single interface as if it were a single database.
A heterogeneous distributed database may have different hardware, operating systems,
database management systems, and even data models for different databases.
2. Define Distributed Database Systems. (Dec 16)
Database spread over multiple machines (also referred to as sites or nodes). Network
interconnects the machines. Database shared by users on multiple machines is called
Distributed Database Systems
3. What are the types of Distributed Database?
Homogenous distributed DB
Heterogeneous distributed DB
4. Define fragmentation in Distributed Database
The system partitions the relation into several fragment and stores each fragment at different
sites
Two approaches:
Horizontal fragmentation
Vertical fragmentation
UNIT-V / PART-B
1. Explain about Object Oriented Databases and XML Databases.
Discuss the concept of XML database (May 22)
2. Write short notes on Distributed Transactions. (Dec 14)
Distributed Transactions system structure (May 22)
3. Explain in detail the Client - Server Architecture for DDBMS
4. Suppose an Object-Oriented database had an object A, which references object B, which in turn
references object C. Assume all objects are on disk initially? Suppose a program first
dereferences A, then dereferences B by following the reference from A, and then finally
dereferences C. Show the objects that are represented in memory after each dereference, along
with their state. (Dec 15)
5. Suppose that you have been hired as a consultant to choose a database system for your client’s
application. For each of the following applications, state what type of database system
(relational, persistent programming language–based OODB, object relational; do not specify a
commercial product) you would recommend. Justify your recommendation.
(i)A computer-aided design system for a manufacturer of airplanes.
(ii)A system to track contributions made to candidates for public office.
(iii)An information system to support the making of movies. (Dec 16)
6. Give the DTD for an XML representation of the following nested-relational schema
Emp = (ename, ChildrenSet setof(Children), SkillsSet setof(Skills))
Children = (name, Birthday)
Birthday = (day, month, year)
Skills = (type, ExamsSet setof(Exams)).
Exams = (year, city) (Dec 16)
7. Explain XML Schema with an example.
8. Explain various queries in IR Systems with an example.
9. Explain ODL and OQL with an example.
10. Explain ODMG – Object Model in detail.
11. Discuss in detail about Distributed Databases (May 19)
12. Explain in detail about Deductive DB and Spatial DB (May 19)
13. i) Illustrate the usage of OQL, the DMG’s query language
ii) Brief on the methods to store XML documents (Dec 19)
14. i) Illustrate the approaches to store relations in distributed database
ii) How effectiveness of retrieval is measured? Discuss (Dec 19)
15. What are the reasons for building distributed database? Discuss the relative advantages of
centralized and distributed databases. Explain the difference between fragmentation,
replication and location transparency. (Dec 20,May 21)
16. State and explain the persistent programming languages. (Dec 20,May 21)
17. Write short notes on spatial and mobile databases (May 22)