Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.

Slides:



Advertisements
Similar presentations
Relational Database and Data Modeling
Advertisements

Monash University Week 7 Data Modelling Relational Database Theory IMS1907 Database Systems.
Systems Development Life Cycle
1 Translation of ER-diagram into Relational Schema Prof. Sin-Min Lee Department of Computer Science.
© 2005 by Prentice Hall 1 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 7 th Edition Jeffrey A. Hoffer, Mary B.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
© 2005 by Prentice Hall Chapter 3a Database Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Data Storage Formats Files Databases
CHAPTER 12: Design: Designing Databases 1.1 MSIS 5653 Advanced Systems Development Dursun Delen, Ph.D. Department of Management Oklahoma State University.
Designing Databases Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Modern Systems Analysis and Design Third Edition
Chapter 9 Designing Databases
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
10-1 Chapter 10 Designing Databases Modern Systems Analysis and Design Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 C omputer information systems Design Instructor: Mr. Ahmed Al Astal IGGC1202 College Requirement University Of Palestine.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Functional Dependence An attribute A is functionally dependent on attribute(s) B if: given a value b for B there is one and only one corresponding value.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 2 Slide 1 Chapter 10 Designing Databases.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Concepts and Terminology Introduction to Database.
1 Translation of ER-diagram into Relational Schema Prof. Sin-Min Lee Department of Computer Science.
CMPE 226 Database Systems September 16 Class Meeting Department of Computer Engineering San Jose State University Fall 2015 Instructor: Ron Mak
Lecture 12 Designing Databases 12.1 COSC4406: Software Engineering.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
10/3/2012ISC329 Isabelle Bichindaritz1 Logical Design.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter 10 Designing Databases Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
Object-Relational Modeling. What Is a Relational Data Model? Based on the concept of relations (tables of data) Relationships established by matching.
Unit 4 Object Relational Modeling. Key Concepts Object-Relational Modeling outcomes and process Relational data model Normalization Anomalies Functional.
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.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 9 Designing Databases.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
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.
©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart 4-1 Relational Databases.
Logical Database Design and the Relational Model.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
6-1 © Prentice Hall, 2007 Topic 6: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
8-1 © Prentice Hall, 2007 Chapter 8: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
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.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 12 Designing.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Cis339 Modern Systems Analysis and Design Fifth Edition Chapter 10 Designing Databases 10.1.
Logical Database Design and the Rational Model
Chapter 4: Logical Database Design and the Relational Model
Chapter 9 Designing Databases
Chapter 5: Logical Database Design and the Relational Model
MIS 322 – Enterprise Business Process Analysis
Modern Systems Analysis and Design Third Edition
Chapter 4 Relational Databases
Translation of ER-diagram into Relational Schema
CMPE 226 Database Systems February 21 Class Meeting
Chapter 9 Designing Databases
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Relational Database.
Chapter 9 Designing Databases
Chapter 12 Designing Databases
Chapter 10 Designing Databases
Chapter 9 Designing Databases
Chapter 17 Designing Databases
Presentation transcript:

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1

Understand role of logical and physical database design in the analysis and design of an information system Transforming an ERD to an equivalent set of well-structured relations Merge normalized relations from separate user views into a consolidated set of well-structured relations Explain choices of storage formats for database tables Transforming well-structured relations into efficient database tables Understand different types of file organizations to store database files Discuss indexes and their purpose Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.2

Define the following database terms: Relation Primary key Functional dependency Foreign key Referential integrity Field Data type Null value Denormalization File organization Index Secondary key Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.2

 Logical database design must account for every data element, system input or output  Normalized relations are the primary deliverable  Physical database design results in converting relations into files Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.4

 Logical Design › Based upon the conceptual data model › Four key steps: 1.Develop a logical data model for each known user interface for the application using normalization principles 2.Combine normalized data requirements from all user interfaces into one consolidated logical database model 3.Translate the conceptual E-R data model for the application into normalized data requirements 4.Compare the consolidated logical database design with the translated E-R model and produce one final logical database model for the application Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.5

 Physical Design › Based upon results of logical database design › Key decisions: 1.Choosing storage format for each attribute from the logical database model 2.Grouping attributes from the logical database model into physical records 3.Arranging related records in secondary memory (hard disks and magnetic tapes) so that records can be stored, retrieved, and updated rapidly 4.Selecting media and structures for storing data to make access more efficient Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.6

 Data represented as a set of related tables or relations  Relation › A named, two-dimensional table of data. Each relation consists of a set of named columns and an arbitrary number of unnamed rows › Properties  Entries in cells are simple  Entries in columns are from the same set of values  Each row is unique  The sequence of columns can be interchanged without changing the meaning or use of the relation  The rows may be interchanged or stored in any sequence Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.7

 Well-Structured Relation › A relation that contains a minimum amount of redundancy and allows users to insert, modify, and delete the rows without errors or inconsistencies Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.8

 The process of converting complex data structures into simple, stable data structures  Eliminates redundancy Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.9

 Second Normal Form (2NF) › Each nonprimary key attribute is identified by the whole key (called full functional dependency)  Third Normal Form (3NF) › Nonprimary key attributes do not depend on each other (called transitive dependencies)  The result of normalization is that every nonprimary key attribute depends upon the whole primary key. Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.10

 Functional Dependency › A particular relationship between two attributes. For a given relation, attribute B is functionally dependent on attribute A if, for every valid value of A, that value of A uniquely determines the value of B. › Instances (or sample data) in a relation do not prove the existence of a functional dependency › Knowledge of problem domain is the most reliable method for identifying functional dependency Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.11

 Second Normal Form (2NF) › A relation is in second normal form (2NF) if any of the following conditions apply: 1.The primary key consists of only one attribute 2.No nonprimary key attributes exist in the relation 3.Every nonprimary key attribute is functionally dependent on the full set of primary key attributes Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.12

 Conversion to second normal form (2NF) › To convert a relation into 2NF, decompose the relation into new relations using the attributes, called determinates, that determine other attributes › The determinates become the primary key of the new relation Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.13

 Third Normal Form (3NF) › A relation is in third normal form (3NF) if it is in second normal form (2NF) and there are no functional (transitive) dependencies between two (or more) nonprimary key attributes › To convert a relation into 2NF, decompose the relation into two relations using the two determinants Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.14

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.15

 Foreign Key › An attribute that appears as a nonprimary key attribute in one relation and as a primary key attribute (or part of a primary key) in another relation  Referential Integrity › An integrity constraint specifying that the value (or existence) of an attribute in one relation depends on the value (or existence) of the same attribute in another relation Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.16

 It is useful to transform the conceptual data model into a set of normalized relations  Steps: 1.Represent entities 2.Represent relationships 3.Normalize the relations 4.Merge the relations Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.17

1. Represent Entities › Each regular entity is transformed into a relation › The identifier of the entity type becomes the primary key of the corresponding relation › The primary key must satisfy the following two conditions a.The value of the key must uniquely identify every row in the relation b.The key should be non-redundant Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.18

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.19

2. Represent Relationships › Binary 1:N Relationships  Add the primary key attribute (or attributes) of the entity on the one side of the relationship as a foreign key in the relation that is on the right side  The one side migrates to the many side Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.20

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.21

2. Represent Relationships (continued) › Binary or Unary 1:1  Three possible options: a. Add the primary key of A as a foreign key of B b. Add the primary key of B as a foreign key of A c. Both › Binary and higher M:N relationships  Create another relation and include primary keys of all relations as primary key of new relation Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.22

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.23

› Unary 1:N Relationships  Relationship between instances of a single entity type  Utilize a recursive foreign key  A foreign key in a relation that references the primary key values of that same relation › Unary M:N Relationships  Create a separate relation  Primary key of new relation is a composite of two attributes that both take their values from the same primary key Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.24

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.25

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.26

3. Merging Relations (View Integration) › Purpose is to remove redundant relations › View Integration Problems Synonyms  Two different names used for the same attribute  When merging, get agreement from users on a single, standard name Homonyms  A single attribute name that is used for two or more different attributes  Resolved by creating a new name Dependencies between nonkeys  Dependencies may be created as a result of view integration  In order to resolve, the new relation must be normalized Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.27