CS348 Lecture Notes - Lecture 9: Unique Key, Foreign Key, Data Definition Language
Document Summary
Translating er diagrams to relational schema 10. 23/25/30. 18: map each entity set to a new table (same primary keys, primary key of entity set primary key of table, map each attribute to a new table column. If identifying relationship set for a weak entity set no action needed. To represent a relationship set involving aggregation of r, treat the aggregation like an entity set whose primary key is that of the table for r. For specialization, create a table for the higher-level entity set and treat specialized entity subsets like weak entity sets (without discriminators) Make tables for strong entities with columns for primary keys and other attributes. Make tables for weak entities with columns for primary keys (including discriminators and primary keys of related entities) and other attributes. 1-to-1 relationships can be represented by adding columns to tables of involved entities (other attributes) Many-to-many relationships must be represented with their own table.