LOGICAL DATABASE DESIGN

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

Logical Database Design
The Relational Model System Development Life Cycle Normalisation
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.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
1 Methodology : Conceptual Databases Design © Pearson Education Limited 1995, 2005.
Methodology Logical Database Design for the Relational Model
Lecture Fourteen Methodology - Conceptual Database Design
Chapter 5 Normalization Transparencies © Pearson Education Limited 1995, 2005.
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.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
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 # 6. Summary: Previous Lecture  Relational model terminology  Mathematical relations  Database relations  Properties.
Normalization. Introduction Badly structured tables, that contains redundant data, may suffer from Update anomalies : Insertions Deletions Modification.
Chapters 17 & 18 Physical Database Design Methodology.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 16 Methodology - Conceptual Database Design.
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
Concepts and Terminology Introduction to Database.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Normalization Transparencies
10/3/2012ISC329 Isabelle Bichindaritz1 Logical 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.
Chapter 9 Methodology - Logical Database Design Chapter 16 in Textbook.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
1/26/2004TCSS545A Isabelle Bichindaritz1 Database Management Systems Design Methodology.
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 E-R Model (II) Keys To identify records in a table Candidate Key Primary Key Alternate Key Composite Key.
Lecture 5 Normalization. Objectives The purpose of normalization. How normalization can be used when designing a relational database. The potential problems.
Chapter 10 Normalization Pearson Education © 2009.
Part4 Methodology of Database Design Chapter 07- Overview of Conceptual Database Design Lu Wei College of Software and Microelectronics Northwestern Polytechnical.
1 Chapter 17 Methodology - Local Logical Database Design.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
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 (概念性的資料建模)
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
Logical Database Design Transparencies 1. ©Pearson Education 2009 Objectives How to create a set of tables from an ER model. How to check that the tables.
Logical Design 12/10/2009GAK1. Learning Objectives How to remove features from a local conceptual model that are not compatible with the relational model.
Normalization. Overview Earliest  formalized database design technique and at one time was the starting point for logical database design. Today  is.
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
Chapter Design Methodology Pearson Education © 2009.
Conceptual Database Design
Logical Database Design
Methodology Conceptual Databases Design
Methodology - Global Logical Database Design
Presentation transcript:

LOGICAL DATABASE DESIGN

Starting Point --> Local Conceptual Models Database design methodology: conceptual, logical and physical database design. Logical database Design: The process of constructing a model of information used in an enterprise based on a specific data model, but independent of a particular DBMS or other physical considerations. Step2: Build and validate local logical data model for each user view. Step3: Build and validate global logical data model

Step2: Build and Validate Local Logical Data model for each user view. Step2.1: Map local conceptual data model to local logical data model. Step2.2: Derive relations from logical data model. Step2.3: Validate model using Normalization. Step2.4: Validate model against user transactions Step2.5: Draw E-R Diagram. Step2.6: Define integrity constraints Step2.7: Review local logical data model with user.

Step2.1: Map local conceptual data model to local logical data model. Objectives: Remove M:N relationships. Remove complex relationships. Remove recursive relationships Remove relationships with attributes Remove multi-valued attributes Re-examine 1:1 relationships Remove redundant relationships.

Step2.2: Derive relations from logical data model Objective: To derive relations from the local logical data model Relationship: primary key/ foreign key mechanism identify the ‘parent’ and ‘child’ entities Strong entity types Staff (Staff_No, Fname, Lname, Street, City, Postcode, Position, Sex, Salary) PrimaryKey Staff_No Weak entity types include a foreign key - - - of the owner entity the primary key of a weak entity is partially or fully derived from the owner entity. Next-of-Kin (Staff_No,Name, Address, Tel_No, Relationship) Primary Key: Staff_No, Name Foreign Key: Staff_No, references Staff(Staff_No)

Step2.3: Validate model using Normalization Objective: To validate a local logical data model using the technique of normalization. Organizes the data according to functional dependencies A normalized relationship is robust and free of update anomalies Normalization provides a flexible database design that can easily be extended First Normal Form (1NF), removes repeating relationship Second Normal Form (2NF), removes partial dependencies on the primary key Third Normal Form (3NF), removes transitive dependencies on the primary key

Step2.4: Validate model against user transactions Objective To ensure that the local logical data model supports the transactions that are required by the user views. ER diagram, data dictionary, primary key/ foreign key links shown in the relations Likely that we have omitted an entity, a relationship or an attribute.

(a) Insert details for a new member of staff Staff_No Property_No M 1 Staff Manages Property (a) Insert details for a new member of staff First check that the new staff no does not already exist --> Prohibit the insertion; otherwise insert the new staff details.. (b) Delete details of a given staff no Search for the given staff no, if not found --> user error, otherwise delete the tuple.

Step2.5: Draw E-R Diagram Objective To identify the final ER diagram that is a local logical representation of the given data given in a user’s view of the enterprise.

Step2.6: Define integrity constraints Objective: to define the entity constraints given in a user’s view of the enterprise. Five types of integrity constraints Required data Attribute domain constraints Entity integrity Referential Integrity Enterprise constraints

Attribute Domain Constraints Entity Integrity Referential Integrity Required data Not allowed to hold nulls e.g.: every member of staff must have an associated position Attribute Domain Constraints e.g.: ‘M’ or ‘F’ for Gender Entity Integrity Primary key of entity cannot hold nulls Referential Integrity The foreign key contains a value that matches with an existing occurrence in the parent table.

Case1: Insert occurrence into child relation (Property) To ensure referential integrity Staff_No -- property occurrence. Case2: Delete occurrence from child relation No problem as referential integrity is not affected. Case3: Update foreign key of a child occurrence Ensure referential integrity Case4: Insert occurrence into parent table Does not cause a problem for referential integrity . Parent without any children . Staff member without a property to manage.

Case5: Delete occurrence from Parent relation (Staff) referential integrity is lost if there exists a child's occurrence. Several strategies NO ACTION: Prevent deletion from parent relation, if any child reference. CASCADE: When the parent occurrence is deleted, delete any child occurrences (not wise) SET NULL: When the parent occurrence is deleted the child occurrences are set to NULL SET DEFAULT: The foreign key values in all child occurrences should be set to default values. Eg: Handled by another (default) member of staff -- Manager NO CHECK: When a parent occurrence is deleted do nothing to ensure referential integrity exists.

Case6: Update the primary key of parent occurrences (Staff) If the primary key value of the parent occurrence is updated, referential integrity is lost if there exists a child occurrence referencing the old primary key value. Enterprise Constraints Called business rules. Eg: No member of staff can manage more than 10 properties at a time Document all Integrity Constraints

Step2.6: Review local logical data model with user Objective To ensure that the logical data model is a true representation of the user’s view. Relationship between the logical data model and data flow diagram Each datastore should represent a whole number of entity types Attributes on data flows should belong to entity types

Step3: Build and Validate Global Logical data Model Objective To combine the individual data logical models into a single global logical data model that can be used to represent the part of the enterprise that we are interested in modeling. Step3.3: Merge local logical data models into global model Step3.2: Validate global logical data model Step3.3: Check for future growth Step3.4: Draw final ER diagram Step3.5: Review global logical data model with users.

Step3.1: Merge local logical data models into global model Objective To merge the individual local logical data models into a single global logical data model of the enterprise. Typical tasks Review the names of entities and their primary keys Review the names of relationships Merge entities form local views Include (without merging) entities unique to each user view. Merge relationships from the local views Include (without merging) entities unique to each local view. Check for missing entities or relationships Check foreign keys Check integrity constraints Draw the global logical data model Update the documentation

View1 View2 Global View Merging Staff (Staff_No, Name, Position, Sex, Salary, Branch_No) Primary Key: Staff_No Foreign Key: Branch_No references Branch(Branch_No) Staff (Staff_No, Fname, Lname, Address, Branch_No) Staff (Staff_No, Fname, Lname, Address, Position, Sex, Salary, Branch_No) View1 View2 Global View

Merge entities from the local views Merge entities with the same name and primary key Merge entities with the same name using different primary keys Merge entities with different names using different primary keys

Merging equivalent entities using different primary keys View1 Staff (Staff_No, Name, Position, Sex, Salary, Branch_No) Primary Key: Name Alternate Key: Staff_No Foreign Key: Branch_No references Branch(Branch_No) View2: Staff (Staff_No, Fname, Lname, Address, Branch_No) Primary Key: Staff_No Alternate Keys: Fname, LName

Step3.2: Validate Global Logical Data Model Step3.3: Check for future growth Step3.4: Draw final ER diagram Step3.5: Review global logical data model with users.