Tải bản đầy đủ (.doc) (3 trang)

bài tập trắc nghiệm cơ sở dữ liệu chương 3 relational model tutorial

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (65.51 KB, 3 trang )

Chapter 3 - Relational Model
Tutorial
1. What kind of data model is the relational model ?
2. (a) Explain the following terms in the context of the relational data model.
Relation
Attribute
Domain
Tuple
Degree
Cardinality
(b) Use the Suppliers-Parts database to provide examples of each (see
Appendix 1 of this tutorial).
3. (a) Explain the following terms in the context of the relational data model.
Candidate Key
Primary Key
Foreign Key
(b) Use the Suppliers-Parts database to provide examples of each.
4. (a) What is the purpose of nulls and what do they represent ?
(b) Is a component of a primary key allowed to accept nulls, why ?
(c) What is the term for this constraint ?
(d) Use the Suppliers-Parts database to discuss why it is desirable to enforce
this constraint.
5. (a) Describe the constraint called referential integrity.
(b) What is the purpose of this constraint ?
(c) Use the Suppliers-Parts database to discuss why it is desirable to enforce
referential integrity.
6. Examine your “course timetable” and try to answer the following questions:
(a) Have all data in the timetable interpretations ?
(b) Are the data and their interpretations kept together ?
(c) Is there any data model behind the data? If so what kind of data model is it
and why ?


(d) Are the data structured in a relation and why ?
(e) How would you re-structure the data according to the rules of the relational
data model ?
7. (a) What is a view ?
(b) Discuss the difference between a view and a base relation.
(c) Explain what happens when a user accesses a database through a view.
Appendix 1
Suppliers - Parts Database
Suppliers
SNo SNam e Status City
S1 Smith 20 London
S2 Jones 10 Paris
S3 Blake 30 Paris
S4 Clark 20 London
S5 Adams 30 Athens
Parts
PNo PName Colour Weight
City
P1 Nut Red 12 London
P2 Bolt Green 17 Paris
P3 Screw Blue 17 Rome
P4 Screw Red 14 London
P5 Cam Blue 12 Paris
P6 Cog Red 19 London
Shipm en ts
SNo PNo Qty
S1 P1 300
S1 P2 200
S1 P3 400
S1 P4 200

S1 P5 100
S1 P6 100
S2 P1 300
S2 P2 400
S3 P2 200
S4 P2 200
S4 P4 300
S4 P5 400

×