Lecture 05 Web Ver
Lecture 05 Web Ver
RDBM Package
• Good relational database software packages allows the
user to:
– Record and display the design of every table, including field
names, descriptions, types, ranges, key fields, foreign keys and
indexes in a data dictionary;
– Record and display relationships between tables;
– Support at least the fundamental relational functions SELECT,
PROJECT and JOIN;
311 C 309
CrsNbr Cname M N
CrsNbr Prerequisite
If a course can 101 Algebra 1 COURSE
103 101
have many 102 Algebra 2 103 102
prerequisites, use a 103 Trig 311 102
CCLink
linking table. 309 Pascal 311 309
311 C
1 M
STUDENT may rank PREFERENCES
(1, 9) (1, 1)
+--------+ +-----------+
¦ ROLE ¦ ¦ PATIENT ¦
+--------+ +-----------+
¦1 ¦1
¦M ¦M
+--------+M 1+-----------+1 M+---------+
¦ ODLINK +---------¦ OPERATION +--------¦ OPDLINK ¦
+--------+ +-----------+ +---------+
¦M ¦1 ¦M
¦1 ¦M ¦1
+--------+ +-----------+ +---------+
¦ DOCTOR ¦ ¦ OPLINK ¦ ¦ POST-OP ¦
+--------+ +-----------+ ¦ DRUG ¦
¦M +---------+
¦1
+------------+
¦ PROCEDURE ¦
+------------+
Tuesday, September 14 90-728 MIS Lecture Notes 17
, 1999
Multiple Linking Tables (cont’d)
The E-R diagram could be implemented as:
ROLE (Role Code)
PATIENT (Patient#, . . .)
DOCTOR (Doctor#, . . .)
PROCEDURE (Procedure Code, Procedure Name)
POST-OP DRUG (Drug Code, Drug Name)
OPERATION (Operation#, Patient#@, Date, Start Time, . . .)
ODLINK (Operation#@, Doctor#@, Role Code@)
OPLINK (Operation#@, Procedure Code@)
OPDLINK (Operation#@, Drug Code@)