Download Database System Design - Southern University College

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Open Database Connectivity wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Serializability wikipedia , lookup

Ingres (database) wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Database wikipedia , lookup

Versant Object Database wikipedia , lookup

ContactPoint wikipedia , lookup

Clusterpoint wikipedia , lookup

Concurrency control wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Southern College
Kolej Selatan
南方学院
Final Examination
Semester 2 / Year 2007
COURSE
COURSE CODE
TIME
DEPARTMENT
CLASS
LECTURER
: DATABASE SYSTEM DESIGN
: CSIS2023
: 2 1/2 HOURS
: COMPUTER SCIENCE
: IT06-C + CS06-C
: SO YONG QUAY
Student’s ID:
Batch No:
Notes to candidates:
1) The question paper consists of 4 pages and 6 questions.
2) Return the question paper with your answer booklet.
3) There are two sections in this paper. Students are required to answer both sections.
a) Section A: Answer any 2 out of 3 questions.
b) Section B: Answer any 2 out of 3 questions.
DATABASE SYSTEM DESIGN
Section A: Answer any 2 out of 3 Questions.
1.
(a) Explain what is meant by a transaction. Why are transactions important units of
operation in a DBMS?
(9%)
(b) DBMS provides concurrency control and recovery mechanisms; and, the
consistency and reliability aspects of transactions are due to the "ACIDity"
properties of transactions. Discuss each of these properties and how they relate to the
concurrency control and recovery mechanisms.
(16%)
2. (a) Discuss the extended capabilities or services that a DDBMS must provide over a
centralized DBMS.
(10%)
(b) One problem area with DDBMSs is that of distributed database design. Discuss
the issues that have to be addressed with distributed database design.
(15%)
3. (a) Discuss the alternative ways that normalization can be used to support database
design.
(8%)
(b) What are the objectives of query processing?
(5%)
(c)
Owner (ownerNo, oName, oAddress, oTelNo)
Pet
(petNo, petName, petDescription, petSex, petDOB, dateRegistered, ownerNo,
surgeryNo)
Staff
(staffNo, sName, sAddress, sTelNo, sex, DOB, position, NIN, taxCode, salary,
surgeryNo)
Surgery
(surgeryNo, surgeryAddress, surgeryTelNo, surgeryFaxNo, mgrStaffNo,
areaNo)
Prescription
(prescNo, petNo, medNo, prescStaffNo, adminMethod, unitsPerDay,
startDate, finishDate)
Medication
Area
(medNo, medName, description, dosage, cost)
(areaNo, areaName)
Using the above relational schema, determine whether the following query is
both type and semantically correct:
(6%)
1/4
DATABASE SYSTEM DESIGN
SELECT P.petNo, petName, oName, O.TelNo
FROM Pet P, Owner O, Prescription Pr, Medication M, Surgery S
WHERE Pr.medNo = M.medNo AND
S.surgeryNo = O.surgeryNo AND
PR.petNo = P.petNo AND
P.ownerNo = O.ownerNo AND
M.medNo = ‘J. Smith’ AND adminMethod = ‘Oral’ AND
S.surgeryNo = 100;
(d) Consider the above relational schema. Map the following query onto a relational
algebra tree (R.A.T).
(6%)
SELECT P.petNo, petName, oName, oAddress
FROM Pet P, Owner O, Prescription P, Medication M
WHERE PR.medNo = M.medNo AND
PR.petNo = P.petNo AND
P.ownerNo = O.ownerNo AND
medName = ‘ Provac’ AND
unitsPerDay > 200 AND
petDescription = ‘Setter’;
2/4
DATABASE SYSTEM DESIGN
Section B: Answer any 2 out of 3 Questions.
4.
Suppose you are involved in developing a database system for the Dr.CarRental
Company. The company has many outlets throughout Malaysia. First, they need to
maintain the car data; the data held on a car are the car register number, manufacturer,
car model and manufacturing date. The car is registered at a particular outlet and can
be hired out to a customer on a given date. Each outlet has its own outlet number,
outlet location, address and telephone number. The outlet number is unique
throughout the outlet. Before hiring a car from the outlet, a customer must first
register as a member. The data held on a member are the first and last name, sex, date
of birth, address, and the date that the member registered. Each member is given a
member number, which is unique throughout the shop. Once registered, a member is
free to hire cars. The data held on each car rented are the car register number,
member number, and the dates the car is rented out and date returned.
Given the above information, create a conceptual schema (ER Diagram) for Dr.
CarRental Company. To simplify the diagram, only show entities, relationships and
the primary key attributes. Specify the cardinality ratio and participation constraint of
each relationship type. State any assumptions you make when creating the EER
model (if necessary).
(25%)
5.
The table showed in following figure lists International Campaign data.
campaign
Code
SMGL
SMGL
SMGL
YPSC
YPSC
campaign Title
Soong Motors
Granda Launch
Soong Motors
Granda Launch
Soong Motors
Granda Launch
Yellow Partridge
Summer Collection
Yellow Partridge
Summer Collection
location
Code
HK
location
Name
Hong Kong
locatonMgr
Vincent Siew
Location
MgrTel
456
NY
New York
Martina Duarte
312
TO
Toronto
Pierre Dubois
37
HK
Hong Kong
Jenny Lee
413
NY
New York
Martina Duarte
312
(a) Identify the functional dependencies represented by the table shown above. State
any assumptions you make about the data shown in this table (if necessary). (5%)
(b) Using the functional dependencies identified in part (b), describe and illustrate the
process of normalization by converting the table shown in Figure 1 to 3rd Normal
Form (3NF). Identify the primary and foreign keys in your BCNF relations.
(20%)
3/4
DATABASE SYSTEM DESIGN
6.
Present a relational schema for the ER diagram shown below.
(25%)
Runs
startDate
1..*
Course
Leads
1..1
0..1
cCode
Manages
1..1
Staff
0..1
staffNo
deptNo
Employs
1..1
0..1
1..*
1..1
1..1
0..*
Teaches
Coordinates
Enrol
Uses
1..*
Student
matricNo
hours
1..*
0..*
1..*
Module
Undertake
0..*
1..*
mCode
performance
___________000__________
4/4
1..1
Department