200 likes | 351 Views
Logical Data Model. How to convert to a rational model?. STUDENT. Name LastName Address. STUDENT. IDNumber Name LastName Address. Entities. Each entity class becomes a table with attributes the entity attributes. The primary key is the entity identifier or a special number. AUTHOR.
E N D
Logical Data Model How to convert to a rational model? Bogdan Shishedjiev Logical Data Model
STUDENT Name LastName Address STUDENT IDNumber Name LastName Address Entities • Each entity class becomes a table with attributes the entity attributes. The primary key is the entity identifier or a special number Bogdan Shishedjiev Logical Data Model
AUTHOR BOOK NoAuthor Name NoBook BookName NoAuthor Binary Associations • Cardinality x,1 – x,N Bogdan Shishedjiev Logical Data Model
PERSON Id Name CAR CarId Brand Model OwnerId PurchaseData Binary Associations • Cardinality x,1 – x,N Bogdan Shishedjiev Logical Data Model
MEMBERCARD CUSTOMER NoCard IssueDate OwnerID CustID Name Address Binary Associations • Cardinality 0,1 – 1,1 Bogdan Shishedjiev Logical Data Model
LOCKER STUDENT No Volume StudID StudID Name Name Address Binary Associations • Cardinality 0,1 – 0,1 or 1,1 – 1,1 LOCKER STUDENT No Volume StudID Name Name Address LockNo Bogdan Shishedjiev Logical Data Model
SUBJECT ENROLL StudID SubjID SubjID NameSubj STUDENT StudID Name Name Address Binary Associations • Cardinality x,N – x,N Bogdan Shishedjiev Logical Data Model
RESTATE OWNS OwnID EstjID part EstID address OWNER OwnID Name Binary Associations • Cardinality x,N – x,N Bogdan Shishedjiev Logical Data Model
SUBJECT ROOM LECTURE TeachID SubjID RoomNo Hours SubjID NameSubj RoomNo Places TEACHER TeachID Name Ternary Association Bogdan Shishedjiev Logical Data Model
Special Cases More than one association OWN HOUSE OwnID address PERSON address Postcode Id Name address Bogdan Shishedjiev Logical Data Model
Special Cases Reflexive associations PERSON Id Name WifeId Bogdan Shishedjiev Logical Data Model
Special Cases Reflexive associations OWNS MotherID DaughterID percentage COMPANY CompanyId address Bogdan Shishedjiev Logical Data Model
BUILDING APARTMENT Address ApartNo Address Floor Weak Entity Bogdan Shishedjiev Logical Data Model
Subtypes Article(ArticleId,Name,Price) Keyboard(ArticleId,SerialID,NKeys,Producer) CPU(ArticleId,brand,Freq,Cache) Monitor(ArticleId,SerialID,screensize) Bogdan Shishedjiev Logical Data Model
EMPLOYEE JOBHISTORY EmpNo Name Job Salary Coefficient EmpNo DateMod newjob Historicizing Bogdan Shishedjiev Logical Data Model
CONTAINS ORDERN SUPPLIER ProductID OrderNo Quantity OrdNo Date SupID SupID Name Example PRODUCT ProductID Name Bogdan Shishedjiev Logical Data Model
Exercise Bogdan Shishedjiev Logical Data Model
Case Study - Policlinic Bogdan Shishedjiev Logical Data Model
Case Study - Policlinic Bogdan Shishedjiev Logical Data Model