CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.

Slides:



Advertisements
Similar presentations
Logical Database Design
Advertisements

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.
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
RELATIONSHIP  THE WAY TABLES ARE RELATED  A TABLE MUST PARTICIPATE IN AT LEAST ONE RELATIONSHIP  IN A BINARY RELATIONSHIP TWO ENTITIES PARTICIPATE 
1 Minggu 11, Pertemuan 22 Conceptual Database Design (Chapter 14.1, 3rd ed.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Lecture Fourteen Methodology - Conceptual Database Design
Motivation for IDEF1X Simplicity Common Standard Useful when relational model is target Air Force 1985 or thereabouts.
Methodology Conceptual Database Design
Modeling & Designing the Database
Chapter 17 Methodology – Physical Database Design for Relational Databases Transparencies © Pearson Education Limited 1995, 2005.
LOGICAL DATABASE DESIGN
Database Design & ER Diagrams
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.
Overview of the Database Development Process
Chapters 17 & 18 Physical Database Design Methodology.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Lecture 9 Methodology – Physical Database Design for Relational Databases.
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
9/14/2012ISC329 Isabelle Bichindaritz1 Database System Life Cycle.
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
Chapter 16 Methodology – Physical Database Design for Relational Databases.
10/3/2012ISC329 Isabelle Bichindaritz1 Logical Design.
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.
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
© Pearson Education Limited, Chapter 9 Logical database design – Step 1 Transparencies.
Conceptual Database Design
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
10/10/2012ISC239 Isabelle Bichindaritz1 Physical Database Design.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
Methodology - Conceptual Database Design
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.
Methodology – Physical Database Design for Relational Databases.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
Chapter 17 Logical Database Design for the Relational Model Pearson Education © 2009.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
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.
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.
Methodology Conceptual Databases Design
Methodology Logical Database Design for the Relational Model
Methodology Conceptual Database Design
Logical Database Design for the Relational Model
Chapter Design Methodology Pearson Education © 2009.
Conceptual Database Design
Logical Database Design
Entities Things about which you need to store data. One entity for each different thing. At least two attributes At least two occurrences Not a property.
Methodology Conceptual Databases Design
Guide to Modeling Keys to E-R diagrams.
Guide to Modeling Keys to E-R diagrams.
Presentation transcript:

CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University

Database Design Methodology Design Methodology –A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the process of design Conceptual database design –The process of constructing a model of the information used in an enterprise, independent of all physical considerations Logical database design –The process of constructing a model of the information used in an enterprise based on a specific data model, but independent of a particular DBMS and other physical considerations Physical database design –The process of producing a description of the implementation of the database on secondary storage; it describes the base relations, file organizations, and indexes used to achieve efficient access to the data, and any associated integrity constraints and security measures

Logical database design for the relational model Build and validate local logical model for each view For each identified view within the enterprise: –Remove features not compatible with the relational model (optional) –Derive relations for local logical data model –Validate relations using normalization –Validate relations against user transactions –Define integrity constraints –Review local logical data model with user

Remove features not compatible with the relational model (optional) The model developed in the Conceptual Design phase may contain some structures that are not easily modeled by conventional relational DBMSs. There are methods for directly mapping these constructs to logical design element. Many-to-many relationships –Insert a new entity between the existing entities, replacing the many-to- many relationship with two one-to-many relationships Many-to-many recursive relationships –Insert a new entity with two relationships to the original entity (each of which are one-to-many relationships) Remove complex relationships –Replace the complex relationship with an entity, and determine the relationship this new entity has with each of the pre-existing entities Remove multi-valued attributes –Insert a new entity with the multi-valued attribute as a single attribute which is the entity’s key

Derive relations for local logical data model Strong entity types –Create a relation that includes all of the simple attribute types in the entity Staff(StaffNo, fName, lName, position, sex, DOB) Primary Key (staffNo) Weak entity types –Create a relation that includes all of the simple attribute types in the entity –Primary Key will be defined when relationships are resolved One-to-many (1:*) relationships –Make primary key of the entity on the “1” side a foreign key on the “*” side One-to-one (1:1) relationships –Both mandatory – combine into one entity –One mandatory one optional – place the primary key of the optional participant as a foreign key in the mandatory participant –Both optional – place primary key of one entity as a foreign key in the other entity

Derive relations for local logical data model One-to-one (1:1) recursive relationships –Both mandatory Have two copies of the primary key in the one entity (renaming the second copy appropriately) –One mandatory, one optional Either have two copies of the primary key in the one entity (as above), or create a new entity that consists of two copies of the primary key –Both optional Create a new entity as described above Superclass-subclass relationship types –Mandatory, And: single relation –Optional, And: two relations, one for superclass and one for all subclasses –Mandatoy, Or: many relations (one for each combine superclass and subclass) –Optional, Or: many relations (one for superclass, one for each subclass)

Derive relations for local logical data model Many to many (*:*) relationship types –Create an entity to represent the relationship –Include all of the simple attributes of the relationship –Include the primary keys of the two entities participating in the relationship These foreign keys make up the primary key for the new entity Complex relationship types –Create an entity to represent the relationship –Include all of the simple attributes of the relationship –Include the primary keys of all of the entities participating in the relationship The foreign keys of entities in a ‘many’ relationship make up the primary key for the new entity Multi-valued attributes –Create a new entity with the multi-valued attribute as key, and include the primary key of the original relation as a foreign key

Validate relations using normalization Ensure that all of the relations created are in at least BCNF Validate relations against user transactions Ensure that all of the user transaction are supported by the relations

Define integrity constraints Required data –Some attributes must always contain a value (not null) Attribute domain constraints –For example, attribute ‘gender’ is restricted to values “M” and “F” Entity integrity –The primary key of an entity cannot hold Nulls

Define integrity constraints Referential integrity –If a foreign key holds a value, the value must match an existing tuple in the parent relation Mandatory – nulls are not allowed Optional – nulls are allowed –Inserting a tuple in child relation Ensure that foreign key is set to nulls or set to a value that matches an existing tuple in the parent relation –Update the foreign key in a child relation Ensure that new value matches an existing tuple in parent relation –Delete tuple from parent relation Referential integrity lost if a child tuple referenced the deleted tuple –No action: Do not allow the delete to succeed –Cascade: automatically delete child tuples that reference the parent –Set null: set the foreign key value in the child tuple to Null –Set default: Set the foreign key value in the child tuple to the default –No check: do nothing to maintain referential integrity

Review local logical data model with the user