50 likes | 387 Views
National Polytechnic Institute of Cambodia Faculty of Computer Science Practical Learning with Mapping ER to Relational Schema (Chapter 3). Exercise 1 Transform the following ER diagram to a relational schema that shows referential integrity constraints.
E N D
National Polytechnic Institute of Cambodia Faculty of Computer Science Practical Learning with Mapping ER to Relational Schema (Chapter 3)
Exercise 1 • Transform the following ER diagram to a relational schema that • shows referential integrity constraints. Chapter 3 Practical Learning with Mapping ER to Relational schema 1
Exercise 1 (Solution) Bank A_C Code Addr Name AcctNo SSN ACCOUNT AcctNo Balance Type BCode BNo BANK_BRANH L_C SSN BCode BranchNo Addr LoanNo LOAN LoanNo Amount Type BCode BNo CUSTOMER SSN Name Phone Addr 2 Chapter 3 Practical Learning with Mapping ER to Relational schema
Exercise 2 • Map the following relational schema into an ER schema. This is part • of a process known as reverse engineering, where a conceptual • schema is created for an existing implemented database. 5 Chapter 3 Practical Learning with Mapping ER to Relational schema
Exercise 2 (Solution) BookID Title PName PAddress PPhone N 1 B-P BOOK PUBLISHER M AuthorName DateOut BOOK- LOANS BOOK- COPIES NoOfCopies DueDate BranchID N LIBRARY-BRANCH BORROWER CardNo BranchName Address BName BAddress BPhone Chapter 3 Practical Learning with Mapping ER to Relational schema 6