0% found this document useful (0 votes)
556 views

Questions - DBMS

This document contains a question bank for the Database Management Systems subject for the first semester of the third year. It includes 24 multiple choice and short answer questions covering topics like ER modeling, relational modeling, functional dependencies, normalization up to BCNF and 4NF, multivalued dependencies, and relational algebra operations. It also provides some examples of SQL queries on sample relational databases.

Uploaded by

Krishna Rathi
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
556 views

Questions - DBMS

This document contains a question bank for the Database Management Systems subject for the first semester of the third year. It includes 24 multiple choice and short answer questions covering topics like ER modeling, relational modeling, functional dependencies, normalization up to BCNF and 4NF, multivalued dependencies, and relational algebra operations. It also provides some examples of SQL queries on sample relational databases.

Uploaded by

Krishna Rathi
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 13

Sinhgad Technical Education Society

Database Management Systems


Question Bank

Academic Year : 2019-20 Semester :I


Class : Third Year
Subject : Database Management Systems
Unit 1
Sr. No. Question

1. A travel agency maintains various taxis. The list of drivers and their licence number is
also maintained by them. A log book maintains details about tours that might have
taken place along with date, location and drivers name and other details.

i) Construct E-R model

ii) Convert E-R into relational model, identify key attributes.


2. Design E-R model for Online Book Shop Database System

i) List the entity sets and their primary keys

ii) Extend the E-R diagram, using Specialization.

3. What are the functional components of DBMS? Explain with neat sketch.

4. Explain Specialization, generalization and aggregation with example.


5. Discuss the entity integrity and referential integrity constraints
6. Explain different functions of DBA.
7. Explain in detail the different levels of abstraction.
8. How following problems are handled with DBMS

i) Data isolation

ii) Data redundancy and inconsistency


iii) Data integrity?
9. Explain significant difference between File Processing and DBMS.
10. Explain the different constraints on specialization/generalization with suitable
example.
11. What is meant by mapping cardinality?
12. Design an E-R diagram with EER features which will model all the entities and
relationships among them for the Airline Reservation System Database.
13. Design an E-R diagram with EER features which will model all the entities and
relationships among them for the Hospital Management System Database.
14. Explain with Example how E-R diagrams are converted into tables
15. Explain the need for the following.

i. View

ii. Foreign Key.


16. Explain various database Languages
17. Explain various Data Models used in DBMS.
18. What is a relation? What are the properties of relation? Explain with example.
19. Explain the following extended entity relationship features of E-R model.

i) specialization ii) generalization

iii) aggregation iv) attribute inheritance


20. Explain Data Independence.
21. Explain Structure of D.B.M.S.

22. Who are all the database users present in DBMS? List out the functions of DBA

23. Explain the types of attributes with an example each.

24. A university registrar’s 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), timings, and classroom;
(c) Students, including student-id, name, and program; and
(d) Instructors, including identification number, name, department, and title.
Further, the enrollment of students in courses and grades awarded to students
in each course they are enrolled for must be appropriately modeled. Construct
an E-R diagram for the registrar’s office and explain in brief how EER diagram
is converted to tables.

25. Live five responsibilities of a database management system for each responsibility
explain the problems that would arise if the responsibility were not discharged.

26. Considertherelationaldatabase

employee (emp_name, street, city )

works (person name, company_name, salary)

company (company name, city)

manages (emp_name, manager_name)

,wheretheprimarykeysare underlined. Give an expression in the relational algebra to


expresseach of the following queries:

a) Find the names of all employees who live in the same city and on the same
street as do their managers.
b) Find the names of all employees in this database who do not work for “First
Bank Corporation”.
c) Findthenamesofallemployeeswhoearnmorethaneveryemployee of “Small Bank
Corporation”.
d) Find emp_name, street & cities of residence whose salary exist in between
30,000 to 40,000 & works for XYZ Ltd.
27. Specify CODD’s norms to be satisfied by RDBMS

28. Explain Natural join Operation and division operation in relational algebra with

example.

29. Explain various operators in relational Algebra.

30. Consider following database:

employee (emp_name, street, city )


works (person name, company_name, salary)

company (company name, city)

manages (emp_name, manager_name)

Draw an ER diagram for above database.

31. Consider the following relational schema.

R = (A, B, C) S = (D, E, F)

Let the relation r(R) and s(S) be given. Give an expression in SQL that is equivalent to
each of the following queries :

i) πA( r )
ii) σB=23( r )
iii) r×s
iv) π A,F(σC=D(r XS))
32. student(ID, name, dept name, tot cred)

takes(ID, course id, sec id, semester, year, grade)

for above consider the following expressions, which use the result of a
relationalalgebra operation as the input to another operation. For each
expression,explain in words what the expression does.

a. σyear≥2009(takes)⋈student
b. σyear≥2009(takes ⋈student)
c. π ID,name,course id(student ⋈takes)
33. employee (person name, street, city)

works (person name, company name, salary)

company (company name, city)

Consider the relational database above. Give an expression in therelational


algebra to express each of the following queries:
a) Find the names of all employees who live in city “Miami”.
b) Find the names of all employees whose salary is greater than $100,000.
c) Find the names of all employees who live in “Miami” and whose salary is
greater than $100,000
d) Find the names of all branches located in “Chicago”.
e) Find the names of all borrowers who have a loan in branch “Downtown”.
Unit 2

Sr. No. Question

1. Define normalization. Explain three normal forms with suitable example


2. Consider R(A, B, C, D, E) with F defined as

A->B,CD->E,A->C,B->D,E->A.

Compute the closure of attributes set AD. (Hint : compute AD+).


3. Give an example of relation schema R and a set of dependencies such that R is in
BCNF, but not in 4 NF.
4. Rewrite the definitions of 4NF and BCNF using the notions of domain constraints and
general constraints.
5. What is decomposition? Suppose that we decompose the schema R = (A, B, C, D, E)
into (A, B, C) and (A, D, E). Show that this decomposition is lossless decomposition if
the following set F of functional dependencies hold.

A -> BC, CD->E, B->D, E->A.


6. Describe the concept of transitive dependency and explain how this concept is used to
define 3 NF.
7. Specify Amstrong’s axioms. Use Amstrong’s axioms to prove the soundness of
pseudo transitivity rule.
8. Explain why 4 NF is more desirable than BCNF. Rewrite the definition of 4NF and
BCNF using the notions of domain constraints and general constraints.
9. Write a short note on view. Define Multivalued dependency. List all the non-travel
Multivalued dependency satisfied by the relation given below

A B C
A1 B1 C1
A1 B1 C2
A2 B1 C1
A2 B1 C3
10. Let R=(A,B,C,D,E) and let M be the following set of multivalued dependencies.

A→→BC, B→→CD, E→→AD.

List the non-trivial Dependencies in M+


11. Describe the concept of transitive dependency and explain how this concept is used to
define 3 NF.
12. Explain good database design properties. With suitable example explain the
consequences of bad designing
13. Write short note on multivalued dependencies and 4NF.
14. What is decomposition ? Explain lossless decomposition and dependency preserving

decomposition with suitable example.


15. What are the different Anomalies in databases?
16. Explain what is meant by repetition of information and inability to represent
information. Explain why each of these properties may indicate a bad relational
database design
17. Why certain functional dependencies are called trivial functional dependencies?

18. Consider the relational database

dept(dept_no, name, location)

employee(emp_no, emp_name, design, dept_no, proj_no)

project(proj_no, proj_name, status)

dept and employees are related as one to many.

project and employees are related as one to many.

Write SQL query for the following :


i) List all the employees of ‘inventory’ department of ‘Mumbai’ location.

ii) Give the names of employees who are working on ‘blood bank’project.

iii) Give the names of manager from ‘marketing’ dept.

iv) Give all the employees working under ‘incomplete’ projects

19. Consider the relational database

Supplier(sid, sname, address)

Parts(pid, pname, color)

Catalog(sid, pid, cost)

Write relational SQL queries for the following :

i) Find names of suppliers who supply some red parts.

ii) Find names of all parts whose cost is more than Rs. 25

iii) Find name of all parts whose color is green.

iv) Find name of supplier and parts with its color and cost.

20. What are different types of joins in SQL? Explain with suitable example.
21. Consider following database :

Student (Roll_no, Name, Address)

Subject (Sub_code, Sub_name)

Marks (Roll_no, Sub_code, marks)

Write following queries in SQL :


i) Find average marks of each student, along with the name of student.

ii) Find how many students have failed in the subject “DBMS”.
22. Consider the following Relations. It defines the schema of the database application for
a bank. It manages the branches and customers of the bank. Customers take loans
(borrow money) or open accounts (deposit money) at one or more branches.

Branch (B_No, B_name, B_city, asset), Customer (C_No,C_Name, C_citystreet)

Loan(Loan_no, B_name, amount),Account (Acc_No, B_name,Balance)

Borrower (C_No, Loan_No),Depositor (C_No, Acc_No)

Answer the following queries in SQL:

1) Find the names and address of customers who have a loan.

2) Find loan data, ordered by decreasing amounts, then increasing loan numbers.

3) Find the pairs of names of different customers who live at the same address but
have accounts at different branches.

23. Consider the following Relations. It defines the schema of the database application for
a library.

Book (Book_ISBN [pk], Title, Publisher_Name [fk])

BOOK_AUTHORS (Book_ISBN [pk, fk], Author_Name [pk])

PUBLISHER(Name [pk], Address, Phone)

BOOK_COPIES (Book_ISBN [pk, fk], Branch_ID [pk, fk], Num_Copies)

BOOK_LOANS (Book_ISBN [pk,fk], Branch_ID [pk, fk], Card_Num[pk, fk],


Date_Out, Date_Due)

LIBRARY_BANCH (Branch_ID[pk], Branch_Name, Address)


BORROWER (Card_Num [pk], Name, Address, Phone)

Answer the following queries in SQL:

1) List the ISBN and title of all books written by “John Smith”.

2) List the ISBN and title of all books written by “John Smith” as the only author.

3) List the Card number and name of all borrowers who checked out two or more
books on 10/16/2003.

4) List the branch ID and name of all library branches that have at least one copy of all
the books.
24. Explain with suitable example SQL aggregate functions.
25. Write the syntax for following SQL commands :

i) create table ii) alter table iii) drop tableiv) insert v) delete vi) update
26. Consider the following database.

Doctor (Doctor_no, Doctor_name, Address, City).

Hospital (Hospital_no, Name, Street, City).

Doc_Hosp (Doctor_no, Hospital_no, Date).

Construct the following Queries in SQL.

1) Find out all Doctors who have visited to Hospital in same city in which they live.

2) Find to which Hospital “Dr. Joshi” has visited.

3) Count no. of Doctors visited to “Shree Clinic” on 1st March 2014.


27. Explain views with suitable example
28. Consider following relational tables

instructor (ID, name, dept_name)


student (ID, dept_name, tot_cred)

takes (ID, course_id, sec_id, semester, year)

course (course_id, title, dept_name, credits)

Dept (Dept_id, dept_name)

Solve following quries using SQL

i. Design above relation tables using SQL DDL statements, primary key and
foreign key
ii. Find the names and average salaries of all departments whose average salary is
greater than 42000.

Unit 3

Sr. No. Question

1. What are the steps of query processing? Explain each in brief


2. What is role of relational algebra in query processing?

3. Define query processing. Explain Merge Join algorithm in Query processing.

4. Explain role of “Selection” operation in query processing.

5. What are the different measures of query cost?


6. State the importance of query optimization

7. Explain equivalence rules for query optimization.

8. What is materialization?
9. What is pipelining?
10. Explain the concept of transaction. Describe ACID properties for transaction.
11. Define serializable schedule. Explain two forms of serializability.
12. Define the sarializability. Give test for conflict serializability. Check whether
following schedule is conflict serializable.

T1 T2

Read(A)

Write (A)

Read(A)

Write(A)

Read(B)

Write(B)

Read(B)

Write(B)

13. How does the granularity of data items affect the performance of concurrency control?
What factors affect the selection of granularity size of data items ?
14. Illustrate difference between conflict serializable schedule and view serializable
schedule by an appropriate example.
15. What are two types of errors that may cause a transaction to fail?
16. Explain Stored procedure and stored function.
17. Explain Assertion and Triggers with suitable example.
18. What is cursor ? Explain with suitable example.
19. List difference between embedded SQL and Dynamic SQL.
20. Write short note on Dynamic SQL.
21. Describe the concept of cursor and how it is used in embedded SQL. Explain various
commands in embedded SQL.
22. Describe the circumstances in which you would choose to use embedded SQL rather
than using SQL alone or using only a general purpose programming language? List
various embedded commands.
23. Explain the need for embedded SQL. List various embedded commands.
24. Explain recoverable and cascade less schedules.

UNIVERSITY IMPORTANT QUESTIONS

1. Describe the three level architecture of DBMS. Explain how it is useful for achieving data
independence.(5)
2. When are two schedules said to be view equivalent? (5)(2)
3. List the responsibilities of DBA. (5)
4. Describe DROP TABLE command of SQL with both the options CASCADE & RESTRICT. (5)
5. Write short note on: Mapping of ISA relationship of E-R diagram to tables. (4)
6. State & explain (any 6) Codd's norms for RDBMS. (6)
7. Why are cursors necessary in embedded SQL? (5)
8. What are the measures of query cost? (5)
9. Specify codd's Norms to be satisfied by RDBMS. (5)
10. Explain the problem that may arrive if the DBA does not discharge the reponsibilities properly.
(5)
11. Explain different Join operations in Relational Algebra with suitable example. (6)
12. What is Normalization? State & explain 2NF & 3NF. (4)
13. What are the possible causes of transaction failure? Explain the significance of ACID properties.
14. Why is query optimization important for databases?
15. Why are cursors necessary in embedded SQL? (5)(2)
16. Define entity & entity set. What is E-R model? (5)
17. What is query? What do you mean by correlated query?
18. List the properties of decomposition. Explain lossless join with example. (6)
19. What are the steps followed in executing write(X) command in transaction?
20. Define query processing. What are the steps involved in query processing?

You might also like