0% found this document useful (0 votes)
18 views6 pages

DBMS Question

The document is a comprehensive question bank for university-level database management topics, covering various units including advantages of DBMS, schema differences, data models, relational algebra, SQL queries, functional dependencies, normalization, serializability, and recovery techniques. Each unit consists of multiple questions that require explanations, examples, and diagrams related to database concepts. The content is structured to facilitate understanding and application of database principles in practical scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

DBMS Question

The document is a comprehensive question bank for university-level database management topics, covering various units including advantages of DBMS, schema differences, data models, relational algebra, SQL queries, functional dependencies, normalization, serializability, and recovery techniques. Each unit consists of multiple questions that require explanations, examples, and diagrams related to database concepts. The content is structured to facilitate understanding and application of database principles in practical scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Questions Bank (University Questions)

UNIT-I
1. Describe advantages and disadvantages of database management system over file processing
system.
2. Explain the difference between external, internal and conceptual schema. How these layers are
related to the concept of logical and physical and physical data independence.
3. Explain the features of DBMS
4. Describe data redundancy.
5. who are data administrators what are the functions of database administrator.
6. What is weak entity set and how it is represented in a diagram?
7. Explain the underlying concept of: specialization and generalization.
8. Give example of a simple composite, single valued and multivalued attribute of an entity.
9. Differentiate between data definition language (DDL) and data manipulation language (DML).
10. What are data models? Briefly explain different type of data models.
11. what are the design issue of entity relationship diagram?
12. Construct an ER diagram for a hospital with a set of patients and a set of medical doctors
associate with each patient a log of various test and examinations conducted. Map your ER
diagram to relational model.
13. Draw an ER diagram for Institute having the entities faculties, students, department and
classroom. Assume suitable attribute of entities and relation among them.
14. A university Registrar office maintain 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), timings and classroom; (c) students, including
student- id, name and program, and (d) instructors, including identification number, name,
department and title. Further the enrolment of student in course 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 assumption that you make about the mapping constraints.
15. Draw the overall structure of DBMS and explain its various components.

UNIT-II
Relational data Model and Language:
1. What is relational algebra? Discuss how it differs from relational calculus.
2. Express natural join and division operators in terms of basic relational algebra operations.
3. Explain the purpose of foreign key.
4. Explain constraints and its types.
5. Why are entity integrity and referential integrity important in a database?
6. Distinguish between primary key candidate key and superkey.
7. Consider the relations given below: -
Dealer (Dealer-no, DealerName, address)
Part (Part-no, Part-name, color)
Assign-to (Dealer-no, Part-no, cost)
Give an expression in relational algebra the following queries: -
a. Find the name of all dealers who supply Red part.
b. Find the name of dealers who supply both Yellow and Green parts.
c. Find the name of the dealers who supply all the parts.
d. Calculate total cost involved in purchasing all parts.
1|Page PRAMOD KUMAR (ASST. PROF.)
e. List all dealer names.
8. Consider the following schemas: -
Suppliers (sid: integer, sname: string, address: string)
Parts (pid: integer, pname: string, color: string)
Catalog (sid: integer, pid: integer, cost: string)
The key attributes are underlined and domain of each attribute is given after attribute name.
The Catalog relation list the prices changed, for part by Suppliers. Write the following queries
in relational algebra: -
a. Find the sids and sname of suppliers who supply some red or green parts.
b. Find the sids of supplier who supplies some red part and some green part.
c. Find the sids of supplier who supply every part.
d. Find the pids of parts that are supplied by at least two different suppliers.
e. Find the pids of most expensive parts supplied by the suppliers named Yosemite Sham.
9. Distinguish between primary key, candidate key and superkey.

Introduction on SQL:
10. Explain external join. How is it different from natural join?
11. Explain Tuple Relational Calculus and Domain Relational Calculus.
12. Explain various characteristics of SQL? Discuss five aggregate functions with suitable example.
13. Consider the following relations: -
Student (ssn, name, address, major)
Course (code, title)
Registered (ssn, code)
Use relational algebra to answer the following: -
a. List the code of course in which at least one student is registered (registered courses).
b. List the title of registered courses.
c. List the codes of courses for which no student is registered.
d. The titles of courses for which no student is registered.
e. Name of students and the title of course they register to.
f. SSNs of student who are registered for both ‘Database System’ and ‘Analysis of
Algorithms ‘.
g. The name of student who are registered for both ‘Database System’ and ‘Analysis of
Algorithms ‘.
h. List of courses in which or students are registered.
i. List of courses in which all ‘ECMP’ major students are registered.
14. Consider the following relational database
employee (employee-name, street, city)
works (employee-name, company-name, salary)
company (company-name, city)
manages (employee-name, manager-name).
Give an expression in SQL to express each of the following queries:
a. Find the names and cities of residence of all employees who work for XYZ bank.
b. Find the names, street address, and cities of residence of all employees who work for
XYZ Bank and earn more than Rs. 10,000 per annum.
c. Find the names of all employees in this database who live in the same city as the
company for which they work.
15. Consider the following relational schema:
Student (name, rollnumber, address, main)
Admission (rollnumber, course, semester)

2|Page PRAMOD KUMAR (ASST. PROF.)


Faculty (course, faculty, semester)
Offering (branch, course)
Assume suitable assumption if you need and write the following queries in SQL:
a. The name of students admitted in a particular course in a given semester.
b. Students who have taken all courses offered by the faculty 'Raghunanadan'.
c. All the courses taken by student 'Amit'.
d. Name all the faculty who had taught student 'Amit'. Find the names of all students who
are studying same courses.
16. Consider the following relational schema. An employee can work in more than one department;
the pct_time attribute of the works relation shows the percentage of time that a given employee
works in a given department:
Emp(eid: integer, ename: string, age: integer, salary: real)
Works(eid:integer, did: integer, pct_time: integer)
Dept(did:integer, budget: real, managerid: integer)
The key attributes are underlined, and the domain of each attribute is given after the attribute
name.
Write the SQL statements required to create the above relations, including appropriate versions
of all primary and foreign key integrity constraints and add the following constraints in schema:
Employees must make a minimum salary of $1,000. Every manager must also be an employee.
The total percentage of all appointments for an employee must be under 100%. A manager must
always have a higher salary than any employee of department that he or she manages.
17. Consider the following schema:
EMPLOYE (EID, EmployeeName, Street, City, Deptt, CompanyName)
COMPANY (CompanyName, City)
WORKS (EmployeeName. CompanyName, Salary) MANAGES (EmployeeName, ManagerName)
Write SQL queries for the following
a. Find out the names of all employees that have 'A' anywhere in their name and are in
department ‘IT'.
b. List the names of departments in ascending order and their employees in descending
order.
c. Find the names, city, deptt of all employees who work for ‘TCS’.
d. Find the name of employee who earns salary more than 30000.
e. List all manager names,
18. 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 output for each of the following queries:
a. Find the total number of persons who owned cars that met with accidents in 2010.
b. Find the total number of accidents in which the cars belonging to 'Abbay' were involved.
c. Add a new accident to the Database with report-number= 'AR101 ', current data &
location 'Noida'.
d. Find the damage amount for the Driver-id 'D001'.
19. Consider the following relations: -
Student (ssn, name, address, major)
Course (code, title)

3|Page PRAMOD KUMAR (ASST. PROF.)


Registered (ssn, code)
Use relational SQL, Tuple Relational Calculus (TRC) and Domain Relational Calculus(DRC) to
answer the following:

a. List the code of course in which at least one student is registered (registered courses).
b. List the title of registered courses.
c. List the codes of courses for which no student is registered.
d. The titles of courses for which no student is registered.
e. Name of students and the title of course they register to.
f. SSNs of student who are registered for both ‘Database System’ and ‘Analysis of
Algorithms ‘.
g. The name of student who are registered for both ‘Database System’ and ‘Analysis of
Algorithms ‘.
h. List of courses in which or students are registered.
i. List of courses in which all ‘ECMP’ major students are registered.

UNIT-III
Functional dependencies
1. List the Armstrong's axioms for functional dependencies. What do you understand by soundness
and completeness of these axioms?
1. Prove or disprove the following using inference rules: -
I. {W  Y, X  Z } I= {WX  Y}
II. {X  Y, X  W, WX  Z} I= {X  Z}.
2. Suppose we have a relation R(A, B,C,D) with some FD’s F as follows:
F = AB  C, C  D, D  A
Compute closures A+, C+, (AB)+, (AC)+ and all FD's (functional dependencies) that follow
from F.
3. Define closure of a FD set. Consider the relation schema R(A, B, C, D, G) with following FDs
{AB  C, C A,
BC  D, ACD  D, D  EG, BE  C, CG  BD, CE  AG}
Compute the closure of BD and CA.
4. For a relation R(A, B, C, D, E, F) the set of FDS given as follows:
F ={AB  C, C  A, BC  D, ACD  B, BE  C, CE  FA, CF  BD, D  E)
Find a non-redundant cover for F. Is this the only non-redundant cover? Find the Canonical
cover. Find the candidate key of relation R.
5. Consider the relation R = (A, B, C, D, E, F, G, H) with following FDs
F = {AC  G, D  EG, BC  D, CG  BD, ACD  B, CE AG}
Find the canonical cover of F.
6. What is functional dependency? Explain trivial and non-trivial functional dependency. Define
canonical cover. Compute canonical cover for the following:
R=(A,B,C) F={ A  BC, B  C, A  B, AB  C }

Normalization: Normal Forms, First, Second, Third normal Forms, BCNF


7. What are the three data anomalies that are likely to occur as a result of data redundancy? Can
data redundancy be completely eliminated in database approach.? Why or why not?
8. Explain 1 NF, 2NF, 3NF and BCNF with suitable examples.

4|Page PRAMOD KUMAR (ASST. PROF.)


9. 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.
10. What do you mean by Normalization? Explain BCNF and 3NF with a suitable example.
11. Distinguish between functional dependency and multivalued dependency.
12. Define and explain BCNF. How is it stricter than 3rd normal form?
13. Consider the following relation and set FDs: -
(A, B, C, D, E, F) and set F ={A  B, C  DF, AC  E, D  F} determine the key for relation.
Normalize the relation upto 3rd normal form and justify your answer.
14. Define 3NF. What are the differences between 3NF and BCNF?

Loss Less Join Decompositions


15. Consider a relation R(A, B, C) with the FDs:
A  B ,B C
Is the decomposition of R into R1(B, C) and R2(A, B) lossless?
16. Consider the relation r(X, Y, Z, W, P, Q) and the set of FDs
F {XY  W, XW  P, PQ  Z, XY  Q}. Determine whether the decomposition
R1(Z, P, Q), R2(X, Y, Z, P, Q) is lossy or lossless.
17. Define functional dependency. What do you mean by loss-less decomposition? Explain with
suitable examples how functional dependencies can be used to show that decompositions are
loss-less.
18. Define Fourth and Fifth normal forms.

UNIT-IV

1. What is serializability? Explain view serializability and conflict serializability.


2. Determine whether the following schedule is conflict serializable or not.
Tl : R(X), T2:R(X), Tl:W(X), T2:R(Y), T3:R(Z), T2:W(Z), T3:W(X), T3:W(Y), T2:W(Y),
T3:W(Z)
3. Which of the following schedules are conflict serializable.? For each serializable schedule,
determine the equivalent serial schedule:
r1(x:); r3(x); w3(x); wl(x): r2(x);
r3(x); r2(x); w3(x); rl(x); wl(x);
r3(x); r3(x); rl(x); w3(x); wl(x);
4. State the conditions for the two schedules to be equivalent. Define a serializable schedule.
5. What is dead lock? How it can be detected and avoided?
6. Discuss the deferred update technique of recovery. What is main advantage of this technique?
Why is it called the NOUNDO/REDO method?
7. What is recoverable schedule? Why is recoverability of schedules desirable? Are there any
circumstances under which it would be desirable to allow non-recoverable schedules? Explain
your answer.
8. What is Log? How is it maintained? Discuss the salient features of deferred database
modification and immediate database modification strategies in brief.
9. Describe in brief the recovery techniques based on immediate update.
10. Describe the essential conditions for the occurrence of deadlock. Discuss an algorithm to
avoid the deadlock.

5|Page PRAMOD KUMAR (ASST. PROF.)


11. Discuss the problem of deadlock, livelock and starvation; Also discuss the approaches to deal
with these problems.
12. What do you mean by heterogeneous distributed databases? Describe some of the important
issues that need to. be addressed by the Heterogeneous · Distributed Database Systems.

UNIT-V

1. Describe major problems associated with concurrent processing with examples. What is the
role of locks in avoiding these problems?
2. What do you mean by Locking techniques of concurrency control? Discuss the various locking
techniques and recovery with concurrent transaction also in detail.
3. Explain in brief working of two-phase locking protocol. Explain with the help of example of a
schedule, how this protocol ensures a schedule to be conflict-serializable, 'but not cascade-
less.
4. Explain the following protocols for concurrency control.
i) Lock based protocols
ii)Time Stamp based protocols
5. Explain the working of various time stamping protocols for concurrency control.
6. Discuss the advantage of validation based protocol in concurrency control. How the locking is
performed in multiple granularity case?
7. Explain multiple-granularity locking. In multiple-granularity locking, what is the differences
between implicit and explicit locking?
8. Describe granularity locking. How does granularity of data items affect the performance of
concurrency control?
9. What do you mean by multiple granularities? How is it implemented in transaction system?
10. Define Multi version scheme

6|Page PRAMOD KUMAR (ASST. PROF.)

You might also like