|
| Name | Course | Course Name | Semester | Grade |
|---|---|---|---|---|
| James Bond | CS170 | Intro to CS | Fall 1997 | B- |
| James Bond | CS255 | Assembler programming | Fall 1998 | B+ |
| James Bond | CS355 | Computer Architecture | Spring 1999 | C+ |
| John Doe | CS170 | Intro to CS | Spring 2000 | A- |
| John Doe | CS255 | Assembler programming | Fall 2001 | C+ |
| John Doe | CS355 | Computer Architecture | Spring 2002 | D+ |
(This is presentation format)
|
(As you know, redundancy of information can cause inconsistent data if you missed some updates !!!)
|
|
|
Schematically:
|
(When I discuss the mapping operation, I will remind you of this material.. - promise :-))
(Database: ~cheung/377/Syllabus/1-files/Logical-Data-Depend)
>> cs377-sql (Select the LogDataIndep database)
>> show tables
+------------------------+
| Tables_in_LogDataIndep |
+------------------------+
| course |
| gradereport |
| student |
+------------------------+
>> select * from student
+------+------------+
| id | name |
+------+------------+
| 007 | James Bond |
| 123 | John Doe |
+------+------------+
>> select * from course
+------+---------+-----------------------+
| cid | cnumber | cname |
+------+---------+-----------------------+
| 1542 | CS170 | Intro to CS |
| 8762 | CS255 | Assembler Programming |
| 8976 | CS355 | Computer Architecture |
+------+---------+-----------------------+
>> select * from gradereport;
+------+------+------------+-------+
| id | cid | semester | grade |
+------+------+------------+-------+
| 007 | 1542 | Fall 1997 | B- |
| 007 | 8762 | Fall 1998 | B+ |
| 007 | 8976 | Spring 199 | C+ |
| 123 | 1542 | Spring 200 | A- |
| 123 | 8762 | Fall 2001 | C+ |
| 123 | 8976 | Spring 200 | D+ |
+------+------+------------+-------+
|
Comment:
|
|
There are "official" terminologies in database literature for these terms
|
Note: there are multiple external schemas in use
|
|
Note: there is only one conceptual schema in use
|
|