You are on page 1of 9

DBMS QUESTION BANK (3RD Year IT)

UNIT-1
1- Distinguish between file-processing system and DBMS.
2- What is the role of database administrator?
3- Construct an ER diagram for a hospital with set of patients and a set of medical doctors.
Associate with each patient, a log of various tests and examinations conducted.
4- Explain the distinction among the terms primary key, candidate key and super key.
5- Can we convert any weak entity set to a strong entity set by adding appropriate attribute?
Why then do we have weak entity set?
6- What is the role of data independence in DBMS?
7- Consider the following set of requirements for a bank database :-
“A large bank has several branches at different places. Each branch maintains the account
details of the customers. The customers may open joint as well as single accounts. The
bank also provides the loan to the customers for different purposes. Bank keeps records
of each transaction by the customer to his account. All the branches have employees and
some employees are managers.”
a) Draw an E-R diagram that captures this information.
b) Transform this E-R diagram to relational database schema.
8- What do you mean by data abstraction? What are difference between physical level,
conceptual level and view level of data abstraction?
9- What is data independence? What are difference between logical data independence and
physical data independence?
10- What is difference between data definition language and data manipulation language?
Explain with example.
11- What do you mean by entity and relationship in ER model? Explain how a relationship
set is defined.
12- Design an ER diagram for Airline Reservation System consisting of Flights, Aircrafts,
Airports, Fares, Reservations, Tickets, Pilots, Crew and Passengers. Clearly highlights
the entities, relationship, primary keys and mapping constraints. Transform this ER
diagram to relational database schemas. Clearly mention the Generalization, Aggregation,
Weak entity and referential integrity in your design.
13- Define following terms : Data, Database, Database System
14- What do you mean by External schema, Conceptual schema and internal schema?
15- Explain the difference between weak and strong entity set.
16- Explain three level architecture of DBMS in detail.
17- Define the term Generalization, Specialization and aggregation with suitable example.
18- Draw the ER diagram of the registration process of the student in a particular course.
Convert the ER diagram into tables also.
19- A university has many departments. Each department may have many full-time and part-
time students. Each department may float multiple courses for its own students. Each

pg. 1
DBMS QUESTION BANK (3RD Year IT)
department has staff members who may be full-time or part-time. Design a
generalization, specialization hierarchy for the university.
20- A university registrar office maintains data about the following entities. A) courses :
including number, title, credits, syllabus and prerequisites; B) Course offerings :
including course number, year, semester, section number, instructor(s), timing and
classroom C) Students : including student id, name and program and D) Instructors
including identification number, name, department and title. Further the enrolment of
students in courses and grades awarded to students in each course they are enrolled for
must be appropriately modelled.
Construct an ER Diagram for the registrar office.Document all assumptions
that you make about the mapping constraints. Convert the ER Diagram into tables.
21- Draw the E-R diagram of the registration process of the student in a particular course.
Convert the E-R diagram into tables also.
22- Construct an E-R diagram for your Institute with a set of teachers and set of students.
Teachers offer various subjects to different Classes.
23- Draw an E-R diagram of a book club. The book club has members. The book club sales
books to its members. The member places orders for books, which the book club fulfils.
Each order contains one or more than one books. The books are written by author(s). The
publisher publishes the books and the author can write more than one book and a book
can have more than one author. A book is published by publisher, but a publisher
publishes many books. A member can place more than one order. He also can choose not
to place an order. The book club sales many books.

pg. 2
DBMS QUESTION BANK (3RD Year IT)
UNIT-2
1) Consider the following relation. The Primary key is Rollno, Isbn,
Student(RollNo, Name, Branch),
Book(Isbn, Title, Author, Publisher)
Issue(Rollno, Isbn, te_of_issue).
Write the query in Relational algebra and SQL of the following
i)List the Roll Number and Name of All CSE Branch Student.
ii) Find the name of students who have issued a book of publication ‘BPB’.
iii) List the title and author of all books which are issued by a student name started with
a.
iv) List the title of all books issued on or before 20/09/2012.
v) List the name of student who will read the book of author named ‘Sanjeev’.
2) How the relational algebra differ from relational calculus and how they are similar.
Explain with some suitable example.
3) What are differences in Cartesian-Product and Natural-Join operations? Explain with a
suitable example.
4) What do you mean by view? Give an example query to create it. What is the difference
between view and table?
5) For the following relational schema :
Employee (Empld, EmpName, Street, City)
Works (EmPId, ComPId, SalarY)
Company (ComPId, ComPName, CitY)
Give an expression in SQL for each of the following queries:
i) Find the names of employees whose salary is more than the average salary of all
employees of their company
ii) Find the name of company that has the largest number of employees
iii) Find names of employees whose salary is more than every employee of company named
'ABCD'.
iv) Find names of companies located in the city in which company 'ABCD' is located.
v) Give all employees a 20 percent raise in salary whose city is different from the city
they work in.
6) Consider the following schema for institute library :
Student (RollNo, Name, Father-Name, Branch)
Book (ISBN, Title, Author, Publisher)
Issue (RollNo, ISBN, Date-of-Issue)
Write the following queries in relational algebra:
i. List Roll Number and Name of all students of the branch 'CSE'.
ii. Find the name of students who have issued a book published by 'ABC' publisher.
iii. List title of all books and their authors issued by a student 'XYZ'.
iv. List title of all books issued on or before Jan 1, 2011.
v. List all books published by publisher' ABC'.
7) Express Natural join and Division operator in terms of basic relational algebra operations.
8) Consider following scheme for PROJECT database
Project(project_no, project_name, project_manager)
Employee(employee_no,employee_name)
Assigned_to(project_no,employee_no)

pg. 3
DBMS QUESTION BANK (3RD Year IT)
i) Write SQL-DDL statement for implementing the PROJECT database. The SQL
statement should clearly indicate the primary key and foreign keys.
ii) Write following queries in SQL
-> Get details of employees working on both project P1 and P2
-> list the names of employees working on project P1 but not on project P2
-> Delete the records of employee whose employee number is E1
-> List the names of employees who are working on a project for which E1 is the
project manager.
9) Consider the following three relation schema S, P and SP in which S# is supplier code,
P# is product code, and QTY is quantity and others carry respective meanings.
S(S#,SNAME,SCITY,TURNOVER)
P(P#,WEIGHT,COLOR,COST,SELLING_PRICE)
SP(S#,P#,QTY)
Write the appropriate relational algebra and Domain relational calculus statements for
the following.
i) Get all details of supplier who operate from DELHI with TURNOVER = 80
ii) Get parts no.’s weighting between 25 and 35.
iii) Get the names of suppliers whose names starts with ‘A’
iv) For each part supplied, get part no. and names of all cities supplying the part
v) Get the names of suppliers who supply part no. 2.
10) What is Cursor in SQL? Explain briefly.
11) Consider the relations given below :
Person (Driver_id. name, address)
Car (License, Model, Year)
Accident (Report_no, Date, Location)
Owns (Driver_id, License)
Participated(Driver_id, License, Report_no, Damage_amount)
Give an expression in SQL with for each of the following queries :
i) Find the total number of persons who owned cars that met with accidents in 2010.
ii) Find the total number of accidents in which the cars belonging to 'Abhay' were
involved.
iii) Add a new accident to the Database with report number: 'AR101', current date &
location 'Noida'.
iv) Find the damage amount for the Driver-id 'D001’
v) Update damage amount for the car with license no. “AABB2000” in the accident
with report no. “AR2197” to $3000.
12) Given the relation schemas R = (A, B, C) and S = (D, E, F) and relation instance r(R) and
s(S). Give an expression in SQL to each of the following queries :
i) B (r)
ii) A>20 (r)
iii) r x s
iv) r natural-join s
v) A, F (C = E (r x s))
(5)
13) Consider the relations given below :
Dealer (Dealer-no.DealerName, address)
Part (Part-no, Part-name, color)

pg. 4
DBMS QUESTION BANK (3RD Year IT)
Assigned-to (Dealer-no, Part-no, cost)
Give an expression in SQL and relational algebra for the following queries:
i) Find the name of all dealers who supply 'Red' Parts'
ii) Find the name of the dealers who supply both Yellow and Green Parts'
iii) Find the name of the dealers who supply all the Parts.
iv) Calculate total costs involved in purchasing, all parts.
v) List all dealer names.
14) What is Trigger? Explain different trigger with example
15) What is cursor? What is difference between implicit and explicit cursor?
16) What do you understand by trigger? Explain with suitable example
17) Explain external join. How is it different from natural join?

pg. 5
DBMS QUESTION BANK (3RD Year IT)
UNIT-3
1) Write difference between BCNF Vs 3 NF.
2) Short Notes of the Followingi)
a) MVD or JD
b) Normalization with advantages
3) Explain 1NF, 2NF, 3NF and BCNF with suitable example.
4) Consider the universal relational schema R(A,B,C,D,E,F,G,H,I,J) and a set of following
functional dependencies F={AB->C,A->DE,B->F,F->GH,D->IJ}. Determine the keys for
R? Decompose R into 2nd Normal Form.
5) What does normalized relation refer to? Define Boyce-Codd normal form. How does it
differs from third normal form.
6) Consider the relation R = (V,W,X,Y,Z). Suppose the following functional dependencies
hold:
Z → V , W → Y , XY → Z, V → WX
State whether the following decomposition of schema R is lossless join decomposition.
(i) R1 = (V, W, X), and R2 = (V, Y, Z)
(ii) R1 = (V, W, X), and R2 = (X, Y, Z)
7) List the Armstrong’s axioms and explain them.
8) Explain various normal forms and explain the motivation behind normal forms.
9) Define and explain the functional dependencies with a suitable example.
10) Suppose a relational schema R = (A,B,C,D,E) is decomposed into (A,B,C) and (A,D,E).
Prove that this decomposition is lossless join decomposition, if the following FDs hold on
R-
A → BC, CD → E, B → D, E → A.
th
11) Define 4 normal form with an example.
12) Discuss join dependency and fifth normal form. Why is 5NF called projection join
normal form?
13) Consider the relational schema R = (A, B, C, D, E, F, G, H) with FDs:
AB → C, BC → D, E → F, G → F, H → A, FG → H
Is the decomposition of R into R1 (A, B, C, D), R2 (A, B, C, E, F), R3 (A, D, F, G, H)
lossless?
14) Define multivalued dependencies.
15) Use Armstrong’s axioms to prove the soundness of the union rule.
16) What do you mean by closure of an attribute set? Consider a relational schema R = (A, B,
C, D) and following set of FDs:
A → BC, AC → D, D → B, AB → D
Determine if the attribute set { A }, { BD }, { D } and { AC } are the super keys for the
relation.

pg. 6
DBMS QUESTION BANK (3RD Year IT)
UNIT-4
1) What do you mean by serializability? Discuss the conflict and view serialzability
withexample. Discuss the testing of serializability also.
2) What is Log? How is it maintained? Discuss the features of deferred database
modificationand immediate database modification in brief.
3) What do you mean by Transaction? Explain transaction property with detail and suitable
example.
4) List the ACID properties. Explain the usefulness of each property.
5) What are schedules? Define conflict and view serializable schedules. State whether the
following schedule is conflict or not:

T1 T2

Read (A)
Write (A)
Read (B)
Write (B)

Read (B)
Write (B)
Read (A)
Write (A)

6) What is log? How is it maintained? Discuss the features of deferred database


modification and immediate database modification in brief.
7) Which of the following schedule is conflict serializable? Also determine serial schedule
for each serializable schedule.
(i) R1 (X); R3 (X); W1 (X); R2 (X); W3 (X);
(ii) R1 (X); R3 (X); W3 (X); W1 (X); R2 (X);
(iii) R3 (X); R2 (X); W3 (X); R1 (X); W1 (X);
8) Consider the transactions T1, T2, T3 and schedules S1 and S2 given below. Draw the
serializability (Precedence) graph for S1 and S2.
T1: R1(X); R1(Z); W1(X);
T2: R2(Z); R2(Y); W2(Z); W2(X);
T3: R3(X); R3(Y); W3(Y);
S1: R1(X); R2(Z); R1(Z); R3(X); R3(Y); W3(Y); R2(Y); W2(Z); W2(Y);
S2: R1(X); R2(Z); R3(X); R1(Z); R2(Y); R3(Y); W1(X); W2(Z); W3(Y); W2(Y);
9) What is the transaction system? How would you make recovery from transaction failure?
Explain with example.
10) Discuss the testing of serializability.
11) What is deadlock? When does it occur? How is it detected in database system?
How can it be avoided?

pg. 7
DBMS QUESTION BANK (3RD Year IT)
12) What is recoverable schedule? Why is recoverable schedule desirable? Are there
any circumstances in which non recoverable schedules are desirable? Explain.
13) Compare shadow paging recovery scheme with log based recovery.
14) What is the difference between in place updating and shadowing? What are
advantages and disadvantages of immediate update?
15) Draw and explain the transaction state diagram.
16) Explain with an example what are cascadeless and recoverable schedules?
17) Explain data replication and data fragmentation with advantages and
disadvantages.
18) Consider the precedence graph in figure and check which type of serializable is it.
Explain your answer.

pg. 8
DBMS QUESTION BANK (3RD Year IT)
UNIT-5
1) Explain two phase locking protocol. Also discuss multiversion two phase locking.
2) When a transaction is rolled back under time stamp ordering, it is assigned a new time
stamp. Why can it not simply keep its old time stamp?
3) What are locks? Differentiate shared mode lock and exclusive mode lock. How can
serializability be ensured by using lock based protocol? With reference to two phase
locking protocol explain how the upgrading and downgrading of the locks take place?
Explain with an example.
4) What is a multiversion scheme of concurrency control? Describe with the help of an
example. Also discuss various time stamping protocols for concurrency control.
5) What do you mean by multiple granuality? Discuss with an example. Also discuss
validation based protocol with a suitable example.
6) What is two phase locking? Describe with the help of an example. Will two phase
locking results in deadlock? Justify your answer with the help of an example.
7) What benefits rigorous two phase locking provide? How does it compare with other form
of two phase locking?
8) State working of multiversion time stamp based protocol. Suggest a scheme to avoid
phantom phenomenon.
9) Discuss different variants of two phase commit protocol applicable to database
management system.
10) Consider the following two transactions:
T31: Read (A)
Read (B)
If A = 0 then B = B + 1;
Write (B)

T32: Read (B)


Read (A)
If B = 0 then A = A + 1;
Write (A)
Add lock and unlock instructions to transactions T31 and T32, so that they observe the
two phase locking protocol. Can the execution of these transactions result in a deadlock?
11) Explain with an example how cascading rollback can be avoided using strict 2PL.
12) Explain:
(i) Time stamp based protocol.
(ii) Checkpoints.
13) In multiple granularity locking, what is the difference between implicit and explicit
locking?

pg. 9

You might also like