Sie sind auf Seite 1von 2

DHARMSINH DESAI UNIVERSITY, NADIAD

FACULTY OF TECHNOLOGY
B.TECH. SEMESTER V [CE]
SUBJECT: (CE-508) DATABASE SYSTEMS
Examination : First Sessional
Date
: 05/08/2016
Time
: 11:30 a.m. -12:45 p.m.

Seat No
Day
Max. Marks

: ______________
: Friday
: 36

INSTRUCTIONS:
1.
Figures to the right indicate maximum marks for that question.
2.
The symbols used carry their usual meanings.
3.
Assume suitable data, if required & mention them clearly.
4.
Draw neat sketches wherever necessary.

Q.1

Do as directed.
a. Difference between Disjoint and Overlapping constraints.
b. Define: Theta join, Natural-join with respect to relational algebra. Give example of
each of the above.
c. Given a relation student(Roll no, name, grade, email id ), where each student has
unique email id and Roll no.
Which of the following is a FALSE statement ? Justify.
A. {Roll no, grade, email id} is a super key.
B. {Roll no, email id} is a candidate key.
C. {Roll no, name} is not a candidate key.
D. {Roll no, grade, email id, name} is a super key.
d. What is the purpose of nominating primary key? What all constraints are inbuilt for the

[1]
[3]
[2]

[2]

primary key? Explain with example.


e. Explain column vs table level constraints giving example of reference key.
[2]
f. What is CRUD in terms of database? Provide different sql command/constructs to perform [2]
CRUD at schema, instance level.

Q.2

Attempt Any TWO of the following questions.

a. (a) Define the concept of aggregation with respect to Relational algebra. Give one
[6]
example where this concept is useful.
(b) Explain the distinction between condition-defined and user-defined constraints with
an example.
b. Consider the following Schema
[6]
Suppliers(sid, name, address)
Parts(pid, pname, color)
Catalog(sid, pid, cost)
Write Relational algebra expressions for the following statements.
1. Find the sids of suppliers who supply some red or green part.
2. Find the sids of suppliers who supply every red part.
3. Find the pids of parts that are supplied by at least two different suppliers.
c. Draw ER.-diagram for the following situation:
[6]
The company database keeps track of a company's employees, departments, and
projects. Indicate all key and cardinality constraints and any assumptions that are
made.
1. Company is organized into departments. Each department has a unique name, a
unique number, several locations and a particular employee who manages the
department. Keep track of the start date when that employee began managing
the department.
2. Department controls a number of projects, each of which has a unique name, a
unique number, and a single location.
3. Store each employee's name, social security number, address, salary, sex, and
birth date. An employee is assigned to one department but may work on several
Page 1 of 2

projects, which are not necessarily controlled by the same department. Keep
track of the number of hours per week that an employee works on each project.
4. Keep track of the dependents of each employee for insurance purposes. And
also keep each dependent's first name, sex, birth date, and relationship to the
employee.
Q.3

Answer the following:


a. Write SQL and results using group by, having and where (all in one) operations with respect to [6]
tableR. Separately write SQL and results using order by on tableS. Make sure to provide
specific details and possible options as well. Refer bottom of page for table structure and data.
b. For the below schemas, perform reverse engineering and draw the corresponding E-R [6]
Diagram. Explain your algorithm while doing so. Column names in bold are primary key for
that table:
Publisher (pubID, pubName, street, city, postcode, telNo, creditCode)
Book Job( jobID, pubID, jobDate, description, jobType)
PurchaseOrder (jobID, poID, poDate)
POItem (jobID, poID, itemID, quantity)
Item (itemID, description, onHand, price))
OR

Q.3

Answer the following:


a. Write SQL and results using different set operations (at-least three) with respect to tableR and [6]
tableS. Make sure to provide specific details and possible options as well. Refer bottom of
page for table structure and data.
b. For the below schemas, find solutions using sql. Column names shown in bold are primary key [6]
for that table:
Patient(patientNo, patName, patAddr, DOB)
Ward (wardNo, wardName, wardType, noOfBeds)
Contains(patientNo, wardNo, admissionDate)
Drug(drugNo, drugName, costPerUnit)
Prescribed(patientNo, drugNo, unitsPerDay, startDate, finishDate)
1. What is the total cost of Morphine drug supplied to as patient named John Smith
2. List all the patients admitted today.
3. List all the patients details, alphabetically by name.

Field1
A
B
D
E
F

tableR
Field2
1
2
3
4
5

Field1
A
C
D
E

tableS
Field2
1
2
3
4

*****

Page 2 of 2

Das könnte Ihnen auch gefallen