0% found this document useful (0 votes)
8 views4 pages

CSE2004 Model Question Paper

This document is a model question paper for a B.Tech(CSE) course on Database Management Systems, covering various topics such as E-R diagrams, functional dependencies, relational algebra, and transaction management. It includes questions on designing databases for a car dealership, analyzing functional dependencies, and writing SQL queries. Additionally, it addresses database administrator responsibilities and transaction properties in concurrent execution scenarios.

Uploaded by

justice.chitra.v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

CSE2004 Model Question Paper

This document is a model question paper for a B.Tech(CSE) course on Database Management Systems, covering various topics such as E-R diagrams, functional dependencies, relational algebra, and transaction management. It includes questions on designing databases for a car dealership, analyzing functional dependencies, and writing SQL queries. Additionally, it addresses database administrator responsibilities and transaction properties in concurrent execution scenarios.

Uploaded by

justice.chitra.v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Reg. No.

:
Name :

Model question Paper


Programme : B.Tech(CSE) Semester : model
Code :
Course Title : Database Management Systems CSE2004
:
Time : Three Hours Max. Marks : 100

Answer all the Questions

1. Create an E-R diagram for a car dealership. The dealership sells both new and used
cars, and it operates a service facility. Base your design on the following business rules:
 A salesperson may sell many cars, but each car is sold by only one salesperson.
 A customer may buy many cars, but each car is sold to only one customer.
 A salesperson writes a single invoice for each car he or she buys.
 A customer gets an invoice for each car he or she buys.
 A customer may come in just to have his or her car serviced, that is, one need
not buy a car to be classified as a customer.
 When a customer takes one or more cars in for repair or service, one service 10
ticket is written for each car.
 The car dealership maintains a service history for each of the cars serviced. The
service records are referenced by the car’s serial number.
 A car brought in for service can be worked on by many mechanics, and each
mechanic may work on many cars.

 A car that is serviced may or may not need parts. (For example, adjusting a
carburetor or cleaning a fuel injector nozzle does not require the use of parts)

List the responsibilities of a database-management administrator. For each


2. a) responsibility,explain the problems that would arise if the responsibility is not 5
discharged.

Keyword queries used in Web search are quite different from database queries. List key 5
b)
differences between the two, in terms of the way the queries are specified, and in terms
of what is the result of a query.
3. 10
Map the given ER diagram to a relational schema and state the steps in the mapping
process.

Page 1 of 4
We wish to develop a database to keep track of persons, their children and their cars.
For this purpose, we will use the following relation:
4.
PersonData(pNbr, pName, pAddress, cNbr, cName, cAddress, aLic, aMake)

pNbr, pName, pAddress is the person number, name and address of a person. cNbr,
cName, cAddress is the corresponding information for a child. Each person has exactly
one address. aLic, aMake is the license number and make of a car. A car may be owned
by more than one person

10
a) What are the functional dependencies in this relation? Find the keys of the relation.
10
b) Is this relation in BCNF? Justify. If not, decompose it into relations that are in BCNF.

A company organizes its activities in projects. Products that are used in the projects are
bought from suppliers. This is described in a database with the following schema:
5.
Projects(projNbr, name, city)
Products(prodNbr, name, color)
Suppliers(supplNbr, name, city)
Deliveries(supplNbr,prodNbr,projNbr, number)

Write relational algebra expressions that give the following information:


10
i. All information about the projects which are located in a city that has
maximum number of projects.
ii. All information about all products that is available in ‘red’ colour.
iii. The supplier numbers of the suppliers who deliver to project number 123.
iv. The product numbers of products that are delivered by suppliers in London.
v. All pairs of product numbers such that at least one supplier delivers both
products
Consider a “Funds Transfer” transaction in a Banking Application. Rs.1000-/- is
debited from user A’s account and credited to user B’s account. A’s opening balance is
6. Rs.5400-/- and B’s opening balance is Rs.3500-/-. Write the respective transaction code 10
snippet T1. While T1 is in progress, user A’s account is credited by a salary payment of
Page 2 of 4
Rs.2000-/-. Write the corresponding transaction code snippet T2. Enumerate and
describe the four desirable properties that must be satisfied so as to allow concurrent
execution of these transactions.
Given the three following relations:
7. Supplier(Supp#, Name, City, Specialty) 10
Project(Proj#, Name, City, Budget)
Order(Supp#, Proj#, Part-name, Quantity, Cost)

For the SQL query:

SELECT Supplier.Name, Project.Name


FROM Supplier, Order, Project
WHERE Supplier.City = ‘New York City’ AND Project.Budget > 10000000 AND
Supplier.Supp# = Order.Supp# AND Order.Proj# = Project.Proj#

a. Write the relational algebraic expression that is equivalent to the above query
and draw a query tree for the expression.
b. Apply the heuristic optimization transformation rules to find an efficient query
execution plan for the above query. Assume that the number of the suppliers in
New York is larger that the number of the projects with the budgets more than
10000000$.
You are the DBA for the VeryFine Toy Company and create a relation called
8. Employees with fields ename, dept, and salary. For authorization reasons, you also
define views EmployeeNames (with ename as the only attribute) and DeptInfo with
fields dept and avgsalary. The latter lists the average salary for each department

i. What privileges should be granted to a user who needs to know only


average department salaries for the Toy and CS departments?
ii. You want to authorize your secretary to fire people (you will probably tell
him whom to fire, but you want to be able to delegate this task), to check on
who is an employee, and to check on average department salaries. What 10
privileges should you grant?
iii. Continuing with the preceding scenario, you do not want your secretary to
be able to look at the salaries of individuals. Does your answer to the
previous question ensure this?
iv. You want to give your secretary the authority to allow other people to read
the EmployeeNames view. Show the appropriate command.
v. Your secretary allows Todd to read the EmployeeNames relation and later
quits. You then revoke the secretary’s privileges. What happens to Todd’s
privileges?
Consider the following two transactions: 10
9. T1: read_item(X);
read_item(Y);
X=X+Y;
write_item(X).
T2: read_item(Y);
read_item(X);
Y=X+Y;

Page 3 of 4
write_item(Y).
Add lock and unlock instructions to transactions T1 and T2, so that they observe the
two-phase locking protocol.

Analyse how the resulting code eliminates – (i) Lost Update (ii) Uncommitted update
(iii) Inconsistent Summary. Justify



Page 4 of 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy