CP363 Lecture Notes - Lecture 18: Foreign Key, Ename, Unique Key

36 views3 pages

Document Summary

The grouping of attributes to form good relation schemas. Design is concerned mainly with base relations. Semantics of the relational attributes must be clear. Guideline 1: informally, each tuple in a relation should represent one entity or relationship instance (applies to individual relations and their attributes) Attributes of different entities (employees, departments, projects) should not be mixed in the same relation. Only foreign keys should be used to refer to other entities. Entity and relationship attributes should be kept apart as much as possible. Bottom line: design a schema that can be explained easily relation by relation. The semantics of attributes should be easy to interpret. Semantics of a tuple: what does a tuple of this table mean. Project: pnumber is unique, dnum is a foreign key into department, etc. Works_on: models many to many relationship between employee and project tables (entities) Anomalies: cause certain issues in correctness of data.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents