CSC271 Database Systems Lecture # 29. Summary: Previous Lecture  The normalization process  1NF, 2NF, 3NF  Inference rules for FDs  BCNF.

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.
Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
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
Lecture Fourteen Methodology - Conceptual Database Design
Chapter 5 Normalization Transparencies © Pearson Education Limited 1995, 2005.
Methodology Conceptual Database Design
Modeling & Designing the Database
Chapter 17 Methodology – Physical Database Design for Relational Databases Transparencies © Pearson Education Limited 1995, 2005.
© Pearson Education Limited, Chapter 12 Physical Database Design – Step 3 (Translate Logical Design) Transparencies.
LOGICAL DATABASE DESIGN
Team Dosen UMN Physical DB Design Connolly Book Chapter 18.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
CSC271 Database Systems Lecture # 21. Summary: Previous Lecture  Phases of database SDLC  Prototyping (optional)  Implementation  Data conversion.
Overview of the Database Development Process
Chapters 17 & 18 Physical Database Design Methodology.
CSC271 Database Systems Lecture # 30.
Lecture 9 Methodology – Physical Database Design for Relational Databases.
Chapter 16 Methodology - Conceptual Database Design.
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
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
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Chapter 6 Normalization 正規化. 6-2 In This Chapter You Will Learn:  更動異常  How tables that contain redundant data can suffer from update anomalies ( 更動異常.
Chapter 16 Methodology – Physical Database Design for Relational Databases.
Normalization Transparencies
CSC271 Database Systems Lecture # 28.
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
10/10/2012ISC239 Isabelle Bichindaritz1 Physical Database Design.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
Methodology - Conceptual Database Design
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
Lecture 5 Normalization. Objectives The purpose of normalization. How normalization can be used when designing a relational database. The potential problems.
Chapter 13 Normalization Transparencies Last Updated: 08 th May 2011 By M. Arief
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.
Methodology – Physical Database Design for Relational Databases.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
ITD1312 Database Principles Chapter 4C: Normalization.
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.
Chapter 8 Relational Database Design Topic 1: Normalization Chuan Li 1 © Pearson Education Limited 1995, 2005.
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
Methodology – Physical Database Design for Relational Databases
國立臺北科技大學 課程:資料庫系統 fall Chapter 18
Conceptual Database Design
Chapter 14 Normalization – Part I Pearson Education © 2009.
Normalization Dale-Marie Wilson, Ph.D..
Methodology Conceptual Databases Design
國立臺北科技大學 課程:資料庫系統 2015 fall Chapter 14 Normalization.
Methodology - Global Logical Database Design
Presentation transcript:

CSC271 Database Systems Lecture # 29

Summary: Previous Lecture  The normalization process  1NF, 2NF, 3NF  Inference rules for FDs  BCNF

Summary: Normalization  First normal form (1NF)  A relation in which the intersection of each row and column contains one and only one value  Second normal form (2NF)  A relation that is in 1NF and every non-PK attribute is fully functionally dependent on the primary key (CKs)  Third normal form (3NF)  A relation that is in 1NF and 2NF and in which no non- primary-key attribute is transitively dependent on the primary key (CKs)  Boyce–Codd normal form (BCNF)  A relation is in BCNF if and only if every determinant is a candidate key

Example: Normalization

FDs

Example: Normalization fd1 propertyNo, iDate → iTime, comments, staffNo, sName, carReg (Primary key) fd2 propertyNo→ pAddress (Partial dependency) fd3 staffNo→ sName (Transitive dependency) fd4 staffNo, iDate→ carReg fd5 carReg, iDate, iTime→ propertyNo, pAddress, comments, staffNo, sName (Candidate key) fd6 staffNo, iDate, iTime→ propertyNo, pAddress, comments (Candidate key)

Example: Normalization  INF to 2NF Property (propertyNo, pAddress) PropertyInspection (propertyNo, iDate, iTime, comments, staffNo, sName, carReg)

Example: Normalization Property fd2 propertyNo → pAddress PropertyInspection fd1 propertyNo, iDate → iTime, comments, staffNo, sName, carReg fd3 staffNo → sName fd4 staffNo, iDate → carReg fd5′ carReg, iDate, iTime → propertyNo, comments, staffNo, sName fd6′ staffNo, iDate, iTime → propertyNo, comments

Example: Normalization  2NF to 3NF Property (propertyNo, pAddress) Staff (staffNo, sName) PropertyInspect (propertyNo, iDate, iTime, comments, staffNo, carReg)

Example: Normalization Property fd2 propertyNo → pAddress Staff fd3 staffNo → sName PropertyInspect fd1′ propertyNo, iDate → iTime, comments, staffNo, carReg fd4 staffNo, iDate → carReg fd5′ carReg, iDate, iTime → propertyNo, comments, staffNo fd6′ staffNo, iDate, iTime → propertyNo, comments

Example: Normalization  3NF to BCNF Property (propertyNo, pAddress) Staff (staffNo, sName) Inspection (propertyNo, iDate, iTime, comments, staffNo) StaffCar (staffNo, iDate, carReg)

Example: Normalization

Building Logical Data Model  Activities included in building logical data model are:  Derive relations for logical data model  Validate relations using normalization  Validate relations against user transactions  Check integrity constraints  Review logical data model with user  Merge logical data models into global model (optional)  Check for future growth

Validate Relations Using Normalization  The logical design may not be the final design, the physical design may be different due to specific performance requirements  A normalized design is robust and free of the update anomalies  Modern computers are powerful (processing overhead acceptable for normalized design)  Normalization produces a flexible/scalable database design

Validate Relations Against User Transactions  To ensure that the relations in the logical data model support the required transactions

Check Integrity Constraints  To check integrity constraints are represented in the logical data model. This includes identifying:  Required data  Attribute domain constraints  Multiplicity  Entity integrity  Referential integrity  General constraints

Check Integrity Constraints

Review Logical DM With User  To review the logical data model with the users to ensure that they consider the model to be a true representation of the data requirements of the enterprise  Use logical data modeling and data flow diagrams to model the users’ requirements specification in an effective manner

Merge LDM into GLDM  To merge logical data models into a single global logical data model that represents all user views of a database  Database with multiple user views  This step might include:  Merge local logical data models into global model  Validate global logical data model  Review global logical data model with users

Merge LDM into GLDM  Merge local logical data models into global model  Review the names and contents of entities/relations and their CKs  Review the names and contents of relationships/foreign keys  Merge entities/relations from the local data models  Include (without merging) entities/relations unique to each LDM  Merge relationships/foreign keys from the local data models  Include (without merging) relationships/foreign keys unique to each LDM  Check for missing entities/relations and relationships/foreign keys  Check foreign keys  Check integrity constraints  Draw the global ER/relation diagram  Update the documentation

Merge LDM into GLDM  Validate global logical data model  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  Review global logical data model with users  To review the global logical data model with the users to ensure that they consider the model to be a true representation of the data requirements of an enterprise

Relations in GLDM

ER Diagram of GLDM

Check for Future Growth  Check for scalability/extensibility  Life is short if the model can sustain current requirements only, significant reworking may be necessary to accommodate new requirements  Quite difficult to achieve, as the enterprise may not know its future plans, even this is not the case, it may be prohibitively expensive both in time/money  However, it is not necessary to incorporate any changes into the data model unless requested by the user

Physical Database Design for Relational Databases Chapter 17

Logical Vs. Physical Database Design  Sources of information for physical design process includes logical data model and documentation that describes model  Logical database design is concerned with the what, physical database design is concerned with the how

Physical Database Design  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

Physical Database Design  Objective of physical database design  Store and access data in an efficient way

Physical Database Design Methodology  Translate logical data model for target DBMS  Design base relations  Design representation of derived data  Design general constraints  Design file organizations and indexes  Analyze transactions  Choose file organizations  Choose indexes  Estimate disk space requirements  Design user views  Design security mechanisms  Consider the introduction of controlled redundancy  Monitor and tune the operational system

Physical Database Design Methodology  Translate logical data model for target DBMS  Design base relations  To decide how to represent base relations identified in logical model in target DBMS  Design representation of derived data  To decide how to represent any derived data present in logical data model in target DBMS  Stored vs. calculated each time  Design general constraints  DBMS vs. general constraints

Summary  Normalization summary/example  Remaining steps/activities in building logical data model  Physical database design  Translate logical data model for target DBMS

References  All the material (slides, diagrams etc.) presented in this lecture is taken (with modifications) from the Pearson Education website : 