DATABASE MANAGEMENT SYSTEMS Jan 2023
DATABASE MANAGEMENT SYSTEMS Jan 2023
|'''|'|'|''|''||'|||
Code No: R2021121 R20 SET - 1
6 a) What are the advantages of views? Listout the constraints for defining [7M]
updateable and non-updateable views.
b) Write SQL queries using exists, in, not, any, and all. [7M]
UNIT-IV
7 a) State BCNF and Explain various alternatives in decomposing in BCNF. [7M]
b) What are the different problems encountered by redundancy? Explain them. [7M]
OR
8 a) Define functional dependency and state full, partial, transitive, multi-valued and [7M]
join dependencies.
b) Explain why 4NF is more desirable than BCNF. [7M]
UNIT-V
9 a) Explain recovery with concurrent transactions. [7M]
b) Explain checkpoints of log-based recovery. [7M]
OR
10 Construct a B+ −tree for the following set of key values. [14M]
(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+−tree for the cases where the number of pointers that will fit
in one node is as follows.
i. four
ii. six
iii. eight
2 of 2
|'''|'|'|''|''||'|||
Code No: R2021121 R20 SET - 2
OR
2 a) With a neat diagram, explain in detail about the structure of a DBMS. [7M]
b) Describe the different types of DBMS users. [7M]
UNIT-II
3 a) What is a constraint? Explain in detail about integrity constraints. [7M]
b) Explain the syntax of various DML commands with suitable examples. [7M]
OR
4 a) What are NULL values? How do they affect the meaning of queries? Can a [7M]
foreign key value in a database be NULL or Duplicates? Justify your answer.
b) Consider the following Relational schemas, [7M]
Sailors( sid: Integer, sname: String, age: Integer, rating: Integer)
Boats(bid: Integer, bname: String, bcolor: String)
Reserves(sid: Integer, bid: Integer, date: Date)
Write the following queries in SQL
i) find the names of sailors who have reserved a red and a green boat
ii) find the names of sailors who have reserved all boats
UNIT-III
5 Consider a university database for the scheduling of classrooms for final exams. [14M]
This database could be modeled as the single entity set exam, with attributes
course-name, section-number, room-number, and time. Alternatively, one or
more additional entity sets could be defined, along with relationship sets to
replace some of the attributes of the exam entity set, as
•course with attributes name, department, and c-number
•section with attributes s-number and enrollment, and dependent as a weak
entity set on course
•room with attributes r-number, capacity, and building
Show an E-R diagram illustrating the use of all three additional entity sets
listed.
1 of 2
|'''|'|'|''|''||'|||
Code No: R2021121 R20 SET - 2
OR
6 Let a and b be relations with the schemas A(name, address, title) and B(name, [14M]
address, salary), respectively. Show how to express a natural full outer join b
using the full outer join operation with an on condition and the coalesce
operation. Make sure that the result relation does not contain two copies of the
attributes name and address, and that the solution is correct even if some tuples
in a and b have null values for attributes name or address.
UNIT-IV
7 a) Suppose that we decompose the schema R = (A, B, C, D, E) into (A,B,C) [7M]
and (A,D,E). Show that this decomposition is lossless-join decomposition if
the following set F of functional dependencies holds: A BC, CD E,
B D, E A.
b) What is a normal form? Explain 2NF and 3NF with examples. [7M]
OR
8 a) Explain the following: i) Surrogate Key ii) Super key iii) Attribute closure [7M]
iv) spurious tuples
b) Discuss the loss-less join and dependency preserving properties. [7M]
UNIT-V
9 a) Discuss various anomalies that arise with concurrent execution of transactions. [7M]
OR
10 a) Construct a B+ tree for the following list of elements. [10M]
43,72,65,32,90,13,16,59
Assume that the initial tree is empty and a node can hold maximum two key
values.
b) Explain various data structures that are required for database management [4M]
recovery by log-based schemes.
2 of 2
|'''|'|'|''|''||'|||
Code No: R2021121 R20 SET - 3
UNIT-III
5 Although you always wanted to be an artist, you ended up being an expert on [14M]
databases because you love to cook data and you somehow confused `data base'
with `databaste.' Your old love is still there, however, so you set up a database
company, Art Base, that builds a product for art galleries. The core of this
product is a database with a schema that captures all the information that
galleries need to maintain. Galleries keep information about artists, their names
(which are unique), birthplaces, age, and style of art. For each piece of artwork,
the artist, the year it was made, its unique title, its type of art (e.g., painting,
lithograph, sculpture, photograph), and its price must be stored. Pieces of
artwork are also classified into groups of various kinds, for example, portraits,
still lifes, works by Picasso, or works of the 19th century; a given piece may
belong to more than one group. Each group is identified by a name (like those
above) that describes the group. Finally, galleries keep information about
customers. For each customer, galleries keep their unique name, address, total
amount of dollars they have spent in the gallery (very important!), and the artists
and groups of art that each customer tends to like.
Draw the ER diagram for the database.
|'''|'|'|''|''||'||| 1 of 2
Code No: R2021121 R20 SET - 3
OR
6 Consider the following relational database. Give an expression in SQL for [14M]
each of the following queries.
employee (employee-name, street, city)
works (employee-name, company-name, salary)
company (company-name, city)
manages (employee-name, manager-name)
a. Find all employees in the database who earn more than each employee of
Small Bank Corporation.
b. Assume that the companies may be located in several cities. Find all
companies
located in every city in which Small Bank Corporation is located.
c. Find all employees who earn more than the average salary of all employees
of their company.
d. Find the company that has the most employees.
e. Find the company that has the smallest payroll.
f. Find those companies whose employees earn a higher salary, on average,
than the average salary at First Bank Corporation.
UNIT-IV
7 a) Compute the closure of the following set F of functional dependencies for [7M]
relation schema R = (A, B, C, D, E).
A →BC
CD →E
B→D
E→A
List the candidate keys for R.
b) Prove that any relation schema with two attributes is in BCNF. [7M]
OR
8 a) Suppose that we decompose the schema R = (A, B, C, D, E) into [10M]
(A, B, C)
(A, D, E)
Show that this decomposition is a lossless-join decomposition if the following
set F of functional dependencies holds:
A → BC
CD → E
B→D
E→A
b) What are the problems caused by redundancy? Discuss in detail. [4M]
UNIT-V
9 a) What is the order of B+ tree? Describe the format of nodes in a B+ tree. Why [7M]
are at the leaf level linked?
b) State and explain the properties of a transaction in DBMS. [7M]
OR
10 a) Describe the B+ tree deletion algorithm with an [7M]
b) Explain the following: i) primary, secondary and clustered indexes [7M]
ii) Dense and sparse indexes
2 of 2
|'''|'|'|''|''||'|||
Code No: R2021121 R20 SET - 4
OR
2 a) Describe three tier schema architecture for data independence. [7M]
b) Explain the difference between physical and logical data independence. [7M]
UNIT-II
3 a) What are key constraints? Explain with examples. [7M]
b) Explain about TCL, DDL, DML commands with suitable examples. [7M]
OR
4 a) Write a brief introduction on relational model. [7M]
b) Consider the following Relational schemas, [7M]
Sailors( sid: Integer, sname: String, age: Integer, rating: Integer)
Boats(bid: Integer, bname: String, bcolor: String)
Reserves(sid: Integer, bid: Integer, date: Date)
Write the following queries in SQL
i) Find the names of sailors who have reserved all boats
ii) Find the ids and names of sailors who have reserved two different boats on
the same day.
i) Find the names of sailors with second highest age
ii) Find the age of the youngest sailor for each rating level
Find the details of sailors who reserved at least one boat
UNIT-III
5 A company database needs to store information about employees (identified by [14M]
ssn, with salary and phone as attributes); departments (identified by dno, with
dname and budget as attributes); and children of employees (with name and age
as attributes). Employees work in departments; each department is managed by
an employee; a child must be identified uniquely by name when the parent (who
is an employee; assume that only one parent works for the company) is known.
We are not interested in information about a child once the parent leaves the
company. Draw an ER diagram that captures
OR
1 of 2
|'''|'|'|''|''||'|||
Code No: R2021121 R20 SET - 4
6 Consider the following relational database. Give an expression in SQL for [14M]
each of the following queries.
employee (employee-name, street, city)
works (employee-name, company-name, salary)
company (company-name, city)
manages (employee-name, manager-name)
a. Find the names of all employees who work for First Bank Corporation.
b. Find the names and cities of residence of all employees who work for First
Bank Corporation.
c. Find the names, street addresses, and cities of residence of all employees
who work for First Bank Corporation and earn more than $10,000.
d. Find all employees in the database who live in the same cities as the
companies
for which they work.
e. Find all employees in the database who live in the same cities and on the
same streets as do their managers.
f. Find all employees in the database who do not work for First Bank
Corporation.
UNIT-IV
7 a) Explain 1NF, 2NF and 3NF in detail with suitable examples. [7M]
b) Define multi valued dependency. Explain decomposition using multi valued [7M]
dependencies.
OR
8 a) Discuss the BCNF and 4th normal form with examples. [7M]
b) Compute the canonical cover Fc, using the following set F of functional [7M]
dependencies for relation scheme R=(A,B,C,D) A→BC, CD→E, B→D,E→A
UNIT-V
9 a) With an example, explain about view serializability and conflict serializability. [7M]
b) Explain about Extendible Hash based indexing technique with an example. [7M]
OR
10 a) Construct a B+ tree for the following list of elements. [7M]
45,77,60,34,100,24,13,51,83
Assume that the initial tree is empty and a node can hold maximum two key
values.
b) Discuss the merits and demerits of fixed field record organization and variable [7M]
length field record organization techniques.
2 of 2
|'''|'|'|''|''||'|||