Logical Database Design Nazife Dimililer. II - Logical Database Design Two stages –Building and validating local logical model –Building and validating.

Slides:



Advertisements
Similar presentations
Logical Database Design
Advertisements

Chapter 6 Methodology Logical Database Design for the Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Systems Development Life Cycle
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
Entity-Relationship Model and Diagrams (continued)
Physical Database Monitoring and Tuning the Operational System.
1 Methodology : Conceptual Databases Design © Pearson Education Limited 1995, 2005.
Methodology Logical Database Design for the Relational Model
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Methodology Conceptual Database Design
Modeling & Designing the Database
LOGICAL DATABASE DESIGN
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Chapter 4 The Relational Model.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Chapters 17 & 18 Physical Database Design Methodology.
Web-Enabled Decision Support Systems
ITEC224 Database Programming
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.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
MIS 301 Information Systems in Organizations Dave Salisbury ( )
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
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.
DATABASE MGMT SYSTEM (BCS 1423) Chapter 5: Methodology – Conceptual Database Design.
Team Dosen UMN Database Design Connolly Book Chapter
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
Methodology - Conceptual Database Design
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
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.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Conceptual Databases Design Step 1 © Pearson Education Limited 1995, 2005.
IS 320 Notes for April 15, Learning Objectives Understand database concepts. Use normalization to efficiently store data in a database. Use.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Logical Database Design and the Relational Model.
Lecture 4: Logical Database Design and the Relational Model 1.
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.
Database Planning Database Design Normalization.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Converting ER/EER to logical schema; physical design issues 1.
April 20022/CS/3X1 Database Design Design method John Wordsworth Department of Computer Science The University of Reading Room.
Logical Database Design and the Rational Model
Methodology Logical Database Design for the Relational Model
Chapter 4 Logical Database Design and the Relational Model
Conceptual Database Design
Logical Database Design
Methodology - Global Logical Database Design
Presentation transcript:

Logical Database Design Nazife Dimililer

II - Logical Database Design Two stages –Building and validating local logical model –Building and validating global logical model The local model represents different (or individual) user views What payroll sees vs. what the accounting sees The global model represents ALL user views What will be the requirements of all departments combined?

Stage 1: Local logical model (Step 2) (for relational model) 1. Remove features not compatible with the model you choose (relational model) 2. Derive relations for local logical model 3. Validate relations using normalization 4. Validate relations against user transactions 5. Define integrity constraints 6. Review local logical data model with the user

Stage 2: Build and validate global logical data model (Step 3) 1. Merge local logical data models into global model 2. Validate global logical data model 3. Check for future growth 4. Review global logical data model with the users

2.1. Remove features not compatible with the relational model Objective: Refine the local conceptual data model to remove undesirable/unsupported features to map to local logical model i.Remove M:N Relationships ii.Remove complex Relationships iii.Remove relationships with attributes iv.Remove multivalued Attributes v.Remove complex Attributes vi.Remove redundant relationships vii.Remove inheritance relationships viii.Re-examine 1:1 relationships

2.1.i. Remove M:N Relationships Example 1

2.1.i. Remove M:N Relationships Example 1 Solution

2.1.i. Remove M:N Relationships Solution? Example 2

Solution? Solution i. Remove M:N Relationships PK of the invoiceline entity is {invoiceId,ProductId}. This means that the same product cannot appear twice on an invoice! In supermarkets, when you buy two of the same product, each of them may be ringed separately. Therefore this solution is not suitable for supermarkets.

2.1.i. Remove M:N Relationships Solution 2 Another problem with the previous solution is that, if you need to print (select from) the contents of the invoiceline entity, you may get a different order every time. But when it comes to invoices, the order is important and every print-out must look exactly identical. For this reason and to solve the problem mentioned before, it is customary to add lineno attribute to invoiceline entity. Please notice that the invoice line entity will not depend on the product entity in this case.

2.1.ii Remove complex Relationships Example 1

2.1.ii Remove complex Relationships Solution?

2.1.ii Remove complex Relationships Solution

2.1.iii Remove Relationships with Attributes Relationships with Attributes are usually M:N or complex relationships. We dealt with these in step 2.1.i and step 2.1.ii If a M:1 relationship contains an attribute move the attribute in the same direction as the Foreign Key. If a 1:1 relationship has an attribute move it to either of the participating entities

2.1.iii. Remove Relationships with Attributes Example 1 Solution Foreign Key Moves in This Direction Is the relationshi p really 1:M?

2.1.iii. Remove Relationships with Attributes Example Solution OR Is the relationship really 1:1?

2.1.iv. Remove Multivalued Attributes Example Solution Assumptions: Each student has only two parents: mother and father Store as many phone numbers for each student as needed!

2.1.iv. Remove Multi-valued Attributes Enhancing the previous solution : Add new attributes/entities/relationships Another solution : Assume that two students may use the same phone number

2.1.v. Remove Complex Attributes Example Solution If the complex attribute may be shared by one or more entities consider representing it as a separate entity

2.1.vi. Remove redundant relationships Example Solution

2.2. Derive relationships from the logical data model Objective : derive tables to represent entities, relationships, and attributes defined in the user view. The local logical model at this step includes only the following Strong entities Weak entities Strong 1:M Binary relationships Strong 1:1 Binary Relationships Identifying (Weak) relationships Document Relations and Foreign Key attributes

2.2 Validate Model Using Normalization Normalization is a procedure for deciding which attributes belong together in an entity type. Normalization forces us to understand each attribute represented in the database completely. Normalization minimizes redundancy and thus update and deletion anomalies. Derive functional dependencies and normalize all relations up to BCNF! There are arguments against normalization Some times you need to Denormalize

Denormalization Transforming normalized relations into unnormalized physical record specifications Benefits: –Can improve performance (speed) be reducing number of table lookups (i.e reduce number of necessary join queries) Costs (due to data duplication) –Wasted storage space –Data integrity/consistency threats Common denormalization opportunities –One-to-one relationship –Many-to-many relationship with attributes –Reference data (1:N relationship where 1-side has data not used in any other relationship)

2.4 Validate against user transactions Objective: To ensure that the local logical data model supports the transactions required by the user view There are two approaches: Check that all information (entity, relationship, attribute) required by the transaction is provided by the model by documenting a verbal description of the transaction Represent the pathway taken by the transaction diagrammatically on the ERD

2.5 Draw Entity Relationship Diagram Draw a final ERD that is the local logical representation of the data given in a user’s view of the enterprise.

2.6 Define Integrity Constraints Integrity constraints are the constraints that we need to impose in order to protect the database from becoming inconsistent. The following constraints must be included in your design: –Required Data –Attribute Domain Constraints –Entity Integrity –Referential Integrity –Enterprise Consttraints

2.6 Define Integrity constraints II We have dealt with the required data, attribute domain and entity integrity constraints before. Revise the design to make sure they are correct and complete Referential Integrity constraint must be further qualified to include existence constraint. –Existence constraint defines conditions under which a unique key or foreign key may be inserted, deleted or updated.

2.6 Define Integrity constraints III A foreign key definition should include one of the following : No action : Do not allow Cascade : Cascade the changes to the children Set Null : set the value of the children to null Set Default : Set the value of the children to a default value No Check : Do not heck any thing (This is not a desirable option)

2.6 Define Integrity constraints IV Enterprise constraints are also known as business rules. –Constrained by enterprise rules governing the “real world” transactions –Usually include more than one entity or a complex rule based on aggregate values. Document of all the integrity constraints. This an important step in the logical design process!!

2.7 Review local logical data model with user. Objective: To ensure that the local logical data model is a true representation of the user’s view.

Stage 2: Build and Validate Global Logical Data Model (Step 3) Objective: Combine individual local logical data models into a single global logical data model representing the part of the enterprise we are interested in modeling This is stage 2 in the Logical design and Step 3 of database design.

3.1 Merge local logical data models into global model Objective : Merge local logical data models into global model Some typical tasks –Review the names and contents of entities/relations and their candidate keys –Review the names and contents of relationships and foreign keys –Merge entities (relations) from the local models –Include, without merging, entities (relations) unique to each local data model –Merge relationships (foreign keys) form the local data models –Include (without merging) relationships (foreign keys) –Check for missing entities (relations) and relationships (foreign keys) –Check foreign keys –Check integrity constraints –Draw global ER diagram –Update documentation

3.2. Validate global logical data model Validate global logical data model Validate the global logical data model using normalization and against the required transactions. –Carefully inspect the boundaries!

3.3 Check for future growth Objective : To determine whether there any significant changes likely in the foreseeable future and to assess whether the global logical data model can accommodate these changes? Develop a model that is extensible, that can evolve with minimal effort That can evolve with minimal effect on existing users

3.4 Draw Final Entity Relationship Diagram After the validation we have a final ERD representing the data requirements of the part of enterprise to be modeled. All the other documentation should also be updated to reflect any changes.

4. Review global logical data model with users Objective: To ensure that the global logical data model is a true representation of the entreprise.

Final Word Remember that the goal of the DB development is to produce a DB that provides an important resource for an organization. The DB should be designed so that it can serve the customers and other team members efficiently.