Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

QUESTION BANK

Database Management System(18CS53)

Faculty: Ms.ANJALI GUPTA

Module 1

1 Discuss the main characteristics of database approach. How it differ from traditional
database.

2 Define data model, schemas and instance.

3 Describe the three schema architecture. What are the problems associated with three
schema architecture.
4 What are the advantages of DBMS? Briefly explain them

5 What are the responsibilities of database administrator?

6 What is database management system? Explain with example

7 Explain the component modules of DBMS and their interaction, with the help of a
diagram.
8 Explain the classification of DBMS.

9 What is the difference between logical independence and physical data independence?

10 Explain the concept of a data model. What data models are used in database management
systems?
11 Discuss the convention for displaying an ER schema as an ER diagram.

12 Design an ER diagram for keeping track of information about a hospital database


taking into account at least 5 entities.
13 Explain the need of primary key and foreign key with suitable example.

14 List the summary of the notation for ER diagram. Include symbols used in ER diagram
and their meanings.
15 With respect to ER model, explain with example,

i)Strong entity ii)weak entity iii)Participation constraints iv)cardinality ratio


v)Recurring relationships.vi)Ternary relationship

16 Explain the conventions for displaying an ER schema as an ER diagram.

17 Discuss concepts related to structural constraints of a relationship type with examples.

18 What is the difference between a key and a superkey?

19 Differentiate between Strong entity set and weak entity set.

20 Define an entity and an attribute. Explain the different types of attributes that occur in an
ER model, with an example.
21 Explain the terms primary key, candidate key, alternate key and secondary key. In
the given table identify each key. STUDENT(SID,Regno, Name, City)
22 What is an E-R model?
Draw an E-R Diagram for the company database with following Descriptions: The
company is organized into departments. Each department has a unique name and a unique
number with several locations.A department controls a number of projects, each of which
has a unique name, unique number and a single location. We store each employees name,
social security number, address, and salary. An employee is assigned to one department
but may work on several projects, which are not necessarily controlled by the same
departments. We want to keep track of the dependents of each employee for insurance
purposes. We keep each dependent’s name, age and relationship to the employee.

23 ER DIAGRAMS
(i) BANK DATABASE
(ii) COMPANY DATABASE
(iii) UNIVERSITY DATABASE/COLLEGE DATABASE
(iv) AIRLINE DATABASE

Module 2

1 Explain how the different update operations deal with constraint violations.
2 Explain the schema based constraints.

3 Explain the different Integrity constraints on relational model

4 List the operation of relational algebra and the purpose of each.

5 Explain the division operator with an example. How can a division operator be
implemented using other relational algebraic operators?
6 Discuss the correspondence between the ER model construct and the relational model
constructs. Show how each ER model can be mapped to the relational model.
7 What is unary relation operation?

8 Define the five basic operators of relational algebra with an example each.

9 What are the different kinds of join operations in relational algebra? Explain each with
example.

10 What is left outer join and right outer join?

11 Explain Natural join and Equi join Operations with example

12 Consider the following relation for a database of the company:

Employee(name,Eno,sex,salary,super no, no.)


Department( Dname, Dnumber, Mgr No)

Dept location(Dnumber,Dlocation)

Project(Pname, Pnumber, Plocation, Dnumber)


WorksOn(EEno., Pno, hours)
Dependent(EEno,Dependent name,sex)

Specify the following queries in relational algebra:

i) Retrieve the name and address of all the employee who work for the design
department.
ii)Find the names of employee who work on all projects controlled by
department no.3

iii)Retrieve the names of employees who have no dependents

13 Write the queries in relational algebra for the above schema, to

i)List the name of all employee with at least two dependents.

ii)Find the name of employee who work on all projects controlled by


department 5.

iii)Retrieve the name of manager who do not have female dependents.

14 For the above schema, Give relation algebra expression for the following:

i) List female employee from DNo.=20 carning


more than 50000.

ii) List CSE Department detail.

iii) Retrieve the first name, last name and salary of all employee who work in
department number 50.

iv) Retrieve the name of the manager of each department.

iv) Retrieve the name and address of all employees who work for the sports
department.

v)Retrieve the names of employee who have no dependents


15

16 Consider the relations

EMPLOYEE (emp#, name)


ASSIGNED_TO (project#, emp#)
PROJECT(project#, project_name,
chief)

Express the following queries in Relational Algebra

(i) Get details of employee working on both comp354 and comp345


project numbers.

(ii)Find the employee number of employee who do not work on project


comp 678.

17 Explain the basic constraints that can be specified in SQL as part of table creation with
example.

18 Explain all possible options that are specified when referential integrity constraint is
violated using suitable example for all options?

19 Explain the syntax of a SELECT statement in SQL.


20 Explain insert, delete and update statements in SQL with example

Module 3

1 Describe the six clauses in the syntax of an SQL retrieval query and show what types of
constructs can be specified in each of the six clauses? Which of the six clauses are
required and which are optional?

2 What are the difference between DDL, DML and DCL commands?

3 With respect to SQL, explain the following:

i)The drop command ii) The alter command

4 Write the SQL query for the following relation algebra expression.

π(“Bdate, Address( σFname=’John’ AND Minit=’B’ AND


Lname=’Smith’(EMPLOYEE)) )
5 Consider the following tables:

Student - Stid, Stname, Details

Subject - Subid, Subname

Marks - Stid, Subid, mark

Write a query to print the list of names of students who have scored the maximum
mark in each subject.

6 Explain the ALTER TABLE command. Explain how a new constraint can be added and
also an existing constraint can be removed using suitable examples

7 Explain IN and EXISTS operations with an example.

8 Explain nested query and co-related nested query with example.


9 Explain how groupBy clause works?What is the difference between WHERE and
Having?
10 Consider the following tables:
WORKS(Pname,Cname,Salary)
LIVES(Pname,Street,City)

LOCATED-IN(Cname,City)
MANGAER(Pname,mgrname)

Write the SQL query for the following:

i) Find the names of all persons who live in the city ‘Mumbai’.

ii) Retrive the names of all person of ‘Infosis’ whose salary is between
Rs.30’000 and Rs. 50’000.

iii) Find the names of all people who live and work in the same city.

iv)

v) List the names of the people who work for ‘wipro’ along with the cities
they live in.

vi) Find the average salary of all ‘Infosians’.

11 How trigger and assertion can be defined in SQL? Explain with example.

12 Write note on Aggregate function in SQL with example.

13 Discuss insertion, deletion and modification anomalies. Why are they considered bad?
Illustrate with example.

14 How is a view created and dropped? What problems are associated with updating of
views?
15 Discuss how each of the following constructs is used in SQL, and discuss the various
options for each construct. Specify what each construct is useful for.

a. Nested queries

b. Joined tables and outer joins

c. Aggregate functions and grouping

d. Triggers

e. Assertions and how they differ from triggers

f. The SQL WITH clause

g. SQL CASE construct

h. Views and their updatability

i. Schema change commands

16 What is embedded SQL? With an example explain how would you Connect to a database,
fetch records and display. Also explain the concept of stored procedure in brief.

17 Explain the following terms: Cursor, Embedded SQL, JDBC, SQLJ, Dynamic SQL,
stored procedure.
18 What are the differences between JDBC and SQLJ? Why do they both exist?

19 Explain the term stored procedure, and give examples why stored procedures are useful.

20 Explain how the following steps are performed in JDBC:

i) Connect to a data source.

ii) Start, commit, and abort transactions.

iii) Call a stored procedure.

How are these steps performed in SQLJ?

21 Compare exception handling and handling of warnings in embedded SQL, dynamic SQL,
JDBC, and SQLJ.

22 Explain the types of JDBC Drivers.

23 What is a cursor? Explain with example, retrieving multiple tuples with embedded SQL.

24 What is a view? Explain the implementation of views.

Module 4

1 What are the different normalization forms?

2 Which normal form is based on the concept of transitive dependency? Explain with an
example the decomposition into 3NF.

3 Which normal form is based on the concept of full functional dependency? Explain the
same with example.
4 A relation R has four attribute ABCD. For each of the following sets of FD, identify the
candidate key and the highest normal form:

i)C→D,C→A,B→C ii)B→C,D→A iii)ABC→D,D→A

5 What is the need of normalization? Explain the first, second and third normal form with
example.
6 What do you mean by closure of attribute? Write an algorithm to find the closure of
attribute.
7 Explain informal design guidelines for relation schemas.

8 What is lossless (or non additive) join property of decomposition? Why is it important?

9 What is the need for normalization?Explain second normal form.Consider the relation
EMP_PROJ={SSn,Pnumber,Hours,Ename,Pname,Pname,Plocation}.
Assume{SSn,Pnumber} as primary key. The dependencies are

SSn Pnumber→{Hours}
SSn→{Ename}

Pnumber→{Pname,Plocation}

Normalize the above relation into 2NF.

10 Give the algorithm for dependency preservation and lossless join.

11 What are the inference rules on FDs. Explain with examples.

12 Define multivalued dependency. Explain 4NF with an example.

13

14 Explain the properties of relational decomposition.

15

16

17 Explain i) Inclusion dependencies ii) Domain key normal form

18 Let R={SSn,Ename,Pnumber,Pname,Plocation,Hours} and D={R1,R2,R3},where


R1=EMP={SSn,Ename}
R2=PROJ={Pnumber,Pname,Plocation}

R3=WORK-ON={SSn,Pnumber,Hours}

The following functional dependencies hold on relation R.

F={SSn→Ename; Pnumber→{Pname, Plocation}; {SSn, Pnumber}→Hours}.

Prove that the above decomposition of relation R has the lossless join property.

19 What is BCNF?

20 What is join dependency and inclusion dependency?

21 What is a functional dependency? List the conditions for a set of functional dependencies
to be minimal.

22 Define join dependency and 5NF

23 Suggest and explain three different techniques to achieve 1nf using suitable example?

24 Explain Attribute Preservation and Functional dependency preservation of a


decomposition.

25 Differentiate between Prime and Non-prime attributes?

26 What is a Functional dependency? Consider the relation schema and normalize the
relation

into 2NF.
Module 5

1. Write short notes on:

a. Two phase locking protocol

b. Write ahead log protocol

c. Time stamp ordering algorithm

d. Transaction support in SQL

2. Explain properties of a transaction with state transition diagram.

3. What is a schedule? Explain with example serial, non serial and conflict serializable
schedule.
4. What are the anomalies that occur due to interleave execution? Give example.
5. Explain all the phases involved in ARIES algorithm with an example.
6. What is two-phase locking protocol? How does it guarantee serializability?
7. Briefly explain the recovery process.

8. Explain the problems that can occur when concurrent transactions are executed. Give
examples.
9. Briefly discuss the two phase locking protocol used in concurrency control.

10. Discuss the ACID properties of the database transaction.

11. Discuss the problems of deadlock and starvation and the different approaches to
dealing with these problems.

12. Explain the principles used behind ARIES algorithm.

13. What is lock management?


14. What is durability of DBMS?
15. What is Redo, Undo and analysis phase.

16. Performance of locking Transaction support in SQL.

17. Write shot note on:-a) Recovering from a System Crash b) Media Recovery

18. What is serializablity? How can it be ensured?

19. Explain shadow paging algorithm with example.

20. Consider the three transactions T1, T2, and T3, and the schedules S1 and S2 given
below. Draw the serializibility (precedence) graphs for S1 and S2 and state whether
eachschedule is serializable or not. If a schedule is serializable, write down the
equivalent serial schedule(s).

T1: r1(x); r1(z); w1(x)

T2: r2(z); r2(y); w2(z); w2(y)

T3: r3(x); r3(y); w3(y)

S1: r1(x); r2(z); r1(x); r3(x); r3(y); w1(x); 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)

You might also like