Chapter 9 Methodology - Logical Database Design Chapter 16 in Textbook.

Slides:



Advertisements
Similar presentations
Logical Database Design Reading: C&B, Chap 17. Dept. of Computer Science, University of Aberdeen2 In this lecture you will learn What is logical database.
Advertisements

Database Design: ER Modelling
Chapter 3 CIS 458 Sungchul Hong
Logical Database Design
CSC271 Database Systems Lecture # 22. Summary: Previous Lecture  Applying Database SDLC on DreamHome  Database planning  System definition  Requirements.
Chapter 6 Methodology Logical Database Design for the Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
1 Methodology : Conceptual Databases Design © Pearson Education Limited 1995, 2005.
Methodology Logical Database Design for the Relational Model
Lecture Fourteen Methodology - Conceptual Database Design
Modeling & Designing the Database
Relational Database Management System A type of database in which records are stored in relational form is called relational database management system.
LOGICAL DATABASE DESIGN
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Logical Database Design Nazife Dimililer. II - Logical Database Design Two stages –Building and validating local logical model –Building and validating.
CSC271 Database Systems Lecture # 21. Summary: Previous Lecture  Phases of database SDLC  Prototyping (optional)  Implementation  Data conversion.
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
Methodology - Conceptual Database Design Transparencies
Software School of Hunan University Database Systems Design Part III Section 5 Design Methodology.
Methodology Conceptual Databases Design
CSCI 3140 Module 2 – Conceptual Database Design Theodore Chiasson Dalhousie University.
1 Chapter 15 Methodology Conceptual Databases Design Transparencies Last Updated: April 2011 By M. Arief
CSC271 Database Systems Lecture # 12. Summary: Previous Lecture  Row selection using WHERE clause  WHERE clause and search conditions  Sorting results.
10/3/2012ISC329 Isabelle Bichindaritz1 Logical Design.
Physical Database Design
CSC271 Database Systems Lecture # 29. Summary: Previous Lecture  The normalization process  1NF, 2NF, 3NF  Inference rules for FDs  BCNF.
Methodology - Conceptual Database Design. 2 Design Methodology u Structured approach that uses procedures, techniques, tools, and documentation aids to.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
Methodology: Conceptual Databases Design
DATABASE MGMT SYSTEM (BCS 1423) Chapter 5: Methodology – Conceptual Database Design.
Team Dosen UMN Database Design Connolly Book Chapter
B. Information Technology (Hons.) CMPB245: Database Design Logical Database Design.
© Pearson Education Limited, Chapter 9 Logical database design – Step 1 Transparencies.
Conceptual Database Design
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
Methodology - Conceptual Database Design
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
CS 3630 Database Design and Implementation. 2 DreamHome Branch (branchNo, street, city, state, zipcode, phone1, phone2, phone3) Staff (staffNo, firstName,
CS 3630 Database Design and Implementation. 2 E-R Model (II) Keys To identify records in a table Candidate Key Primary Key Alternate Key Composite Key.
1 E-R Model (II) Keys To identify records in a table Candidate Key Primary Key Alternate Key Composite Key.
Chapter 13 Normalization Transparencies Last Updated: 08 th May 2011 By M. Arief
1 Chapter 17 Methodology - Local Logical Database Design.
Chapter 7 SQL: Data Definition Pearson Education © 2009.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
Chapter 17 Logical Database Design for the Relational Model Pearson Education © 2009.
Schema Conversion Create a table for each entity –1:1 choose one side and put a foreign key –1:* put a foreign key in many side –*:* create a table for.
Conceptual Databases Design Step 1 © Pearson Education Limited 1995, 2005.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
Chapter 8 Conceptual Data Modeling (概念性的資料建模)
Lecture4: Informal guidelines for good relational design Mapping ERD to Relation Prepared by L. Nouf Almujally Ref. Chapter3 Lecture4 1.
CSCI 6315 Applied Database Systems Review for Midterm Exam I Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
Logical Design 12/10/2009GAK1. Learning Objectives How to remove features from a local conceptual model that are not compatible with the relational model.
Methodology - Logical Database Design. 2 Step 2 Build and Validate Local Logical Data Model To build a local logical data model from a local conceptual.
April 20022/CS/3X1 Database Design Design method John Wordsworth Department of Computer Science The University of Reading Room.
Teacher Workshop Database Design Pearson Education © 2014.
Methodology Conceptual Databases Design
Methodology Logical Database Design for the Relational Model
Methodology Conceptual Database Design
Logical Database Design for the Relational Model
Logical Database Design for the Relational Model
Chapter Design Methodology Pearson Education © 2009.
Chapter 14 Normalization
The Relational Database Model
Conceptual Database Design
Chapter 4+17 The Relational Model Pearson Education © 2014.
Logical Database Design
Methodology Conceptual Databases Design
Methodology - Global Logical Database Design
Presentation transcript:

Chapter 9 Methodology - Logical Database Design Chapter 16 in Textbook

2 Objectives Map the conceptual model into relations. Validate these relations using the technique of normalization. Validate a logical data model to ensure it supports required user transactions. Merge local logical data models based on specific views into a global logical data model of the enterprise. Ensure that resultant global model is a true and accurate representation of enterprise. Logical DB Design

3 Step 2 Build and Validate Local Logical Data Model Step 2.1 Derive relations for local logical data model Step 2.2 Validate relations using normalization Step 2.3 Validate relations against user transactions Step 2.4 Define integrity constraints Step 2.5 Review local logical data model with user Logical DB Design

4 Step 2.1 Derive relations for local logical data model Objective: To create relations for the local logical data model to represent the entities, relationships, and attributes that have been identified. –Strong entity types. –Weak entity types. –1:1 binary relationship types. –1:M relationship types. –1:1 recursive relationship types. –Superclass/Subclass relationship types. –M:N relationship types. Document relations and foreign key attributes. Logical DB Design

5 Relations for the Staff View of DreamHome Staff (staffNo, FName, Lname, position, sex, DOB, SupervisorStaffNo) Foreign Key SupervisorStaffNo reference Staff(StaffNo) BusinessOwner (OwnerNo, BName, Btype, ContactName, address, TelNo) Alternate Key bName Alternate Key TelNo Lease (LeaseNo, PaymentMethod, depositPaid, RentStart, RentFinish, ClientNo, PropertyNo) Alternate Key PropertyNo, RentStart Foreign Key ClientNo refrences Client(ClientNo) Foreign Key PropertyNo refrences Client(ClientNo) Derived deposit (PropertForRent.rent * 2) Derived duration (RentFinish -RentStart) Logical DB Design

6 Step 2 Build and Validate Local Logical Data Model Step 2.2 Validate relations using normalization Objective: To ensure that each relation is in at least BCNF. Step 2.3 Validate relations against user transactions Objective: To ensure that the relations in the local logical data model support the transactions required by the view. Logical DB Design

7 Step 2 Build and Validate Local Logical Data Model Step 2.4 Define integrity constraints Integrity constraints protects DB from being inconsistent. Types of integrity constraints: –Required data. –Entity integrity. –Referential integrity. –Attribute domain. –Enterprise constraints. Logical DB Design

8 Step 2 Build and Validate Local Logical Data Model In testing referential integrity check the following cases: Insert tuple into child relation. Delete tuple from child relation. Update FK of child tuple. Insert tuple into parent relation. Delete tuple from parent relation. Update PK of parent tuple. Logical DB Design

9 Referential Integrity Constraints for Relations Staff (staffNo, FName, Lname, position, sex, DOB, SupervisorStaffNo) Foreign Key SupervisorStaffNo reference Staff(StaffNo) ON UPDATE CASCADE ON DELETE SET NULL BusinessOwner (OwnerNo, BName, Btype, ContactName, address, TelNo) Alternate Key bName Alternate Key TelNo Lease (LeaseNo, PaymentMethod, depositPaid, RentStart, RentFinish, ClientNo, PropertyNo) Alternate Key PropertyNo, RentStart Foreign Key ClientNo refrences Client(ClientNo) ON UPDATE CASCADE ON DELETE NO ACTION Foreign Key PropertyNo refrences Client(ClientNo) ON UPDATE CASCADE ON DELETE NO ACTION Derived deposit (PropertForRent.rent * 2) Derived duration (RentFinish -RentStart) Logical DB Design

10 Step 2 Build and Validate Local Logical Data Model Step 2.5 Review local logical data model with user Objective: To ensure that the local logical data model and supporting documentation that describes the model is a true representation of the view. Logical DB Design

11 Step 3 Build and validate global logical data model Combine the individual local logical data models into a single global logical data model that represents the enterprise. Step 3.1 Merge local logical data models into global model Step 3.2 Validate global logical data model Step 3.3 Check for future growth Step 3.4 Review global logical data model with users Logical DB Design

12 Step 3.1 Merge local logical data models into global model 1. Review the names & contents of entities/relations and their CK. 2. Review the names & contents of relationships/FK. 3. Merge entities/relations from the local models. 4. Include (without merging) entities/relations unique to each local model. 5. Merge relationships/FK from the local models. 6. Include (without merging) relationships/FKs unique to each local model. 7. Check the missing entities/relations and relationships/FKs. 8. Check FKs. 9. Check integrity constraints. 10. Draw the global ER/relation diagram. 11. Update the documentation.

13 1. Review the names & contents of entities/relations and their CK Branch View Entity Type CK Branch BranchNo PostCode Telephone TelNo Staff StaffNo Manager StaffNo PrivateOwner OwnerNo BusinessOwner Bname telNo Client ClientNo PropertyForRent Propertyno Lease LeaseNo PropertyNo RentStart ClientNo, RentStart Staff View Entity Type CK Staff StaffNo PrivateOwner OwnerNo BusinessOwner Bname telNo OwnerNo Client ClientNo PropertyForRent Propertyno Viewing ClientNo, PropertyNo Logical DB Design

14 2. Review the names & contents of relationships/FK Branch View FK Relationship mgrStaffNo -> Manager(StaffNo) Manages branchN -> Branch(branchNo) supervisorStaffNo -> Staff(staffNo) Supervisor branchNo -> Branch(branchNo) StaffNo -> Staff(StaffNo) OwnerNo -> PrivateOwner(ownerNo) Owns OwnerNo -> Owns BusinessOwner(ownerNo) StaffNo -> Staff(StaffNo) Oversees BranchNo -> Branch(BranchNo) Offers Staff View FK Relationship Relation Branch Telephone Staff Manager PrivateOwner BusinessOwner Client PropertyForRent Viewing supervisorStaffNo -> Staff(staffNo) Supervisor StaffNo -> Staff(StaffNo) Registers OwnerNo -> PrivateOwner(ownerNo) POwns OwnerNo -> BOwns BusinessOwner(ownerNo) StaffNo -> Staff(StaffNo) Manages Logical DB Design

15 3. Merge entities/relations from the local models 1. Merge entities/relations with the same name & the same PK. Branch ViewStaff View PRIVATE OWNER(Ono, name, address) PRIVATE OWNER(Ono, fname, lname, address) Global View PRIVATE OWNER(Ono, fname, lname, address) Logical DB Design

16 3. Merge entities/relations from the local models 2. Merge entities/relations with the same name but different PK. Branch ViewStaff View BOWNER(bName, bType, address) BOWNER(Ono, bName, bType, address) AK telNo AK bName, telNo Global View BOWNER(Ono, bName, bType, address) AK bName, telNo 3. Merge entities/relations with the different names using the same or different PK. Logical DB Design

17 4. Include (without merging) entities/relations unique to each local model The Previous task should identify all entities/relations that are the same. All remaining entities/relations are included in the global model without change. Logical DB Design

18 5. Merge relationship/FK from the local models 1. Merge relationship/FKs with the same name & the same purpose. 2. Merge relationship/FKs with different names but the same purpose. Logical DB Design

19 6. Include (without merging) relationships/FKs unique to each local model Logical DB Design Again, the Previous task should identify all relationships/FKs that are the same. All remaining relationships/FKs are included in the global model without change.

20 Step 3 Build and Validate Global Logical Data Model Step 3.2 Validate global logical data model Objective: To validate the relations created from the global logical data model using the technique of normalization and to ensure they support the required transactions, if necessary. Step 3.3 Check for future growth Objective: To determine whether there are any significant changes likely in the foreseeable future and to assess whether the global logical data model can accommodate these changes. Step 3.4 Review global logical data model with users Objective: To ensure that the global logical data model is a true representation of the enterprise. Logical DB Design