Chapter 9 Designing Databases

Slides:



Advertisements
Similar presentations
Monash University Week 7 Data Modelling Relational Database Theory IMS1907 Database Systems.
Advertisements

1 Translation of ER-diagram into Relational Schema Prof. Sin-Min Lee Department of Computer Science.
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
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 8 Structuring System Data Requirements
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.
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.
Lecture 12 Designing Databases 12.1 COSC4406: Software Engineering.
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,
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.
© 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,
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.
Cis339 Modern Systems Analysis and Design Fifth Edition Chapter 10 Designing Databases 10.1.
Converting ER/EER to logical schema; physical design issues 1.
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Chapter 8: Object-Relational Modeling
Logical Database Design and the Rational Model
Chapter 4 Logical Database Design and the Relational Model
Chapter 4: Logical Database Design and the Relational Model
Chapter 9 Designing Databases
Chapter 6 Structuring System Requirements: Conceptual Data Modeling
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
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Relational Database.
Chapter 7 Structuring System Requirements: Conceptual Data Modeling
Chapter 9 Designing Databases
Chapter 12 Designing Databases
Chapter 7 Structuring System Requirements: Conceptual Data Modeling
Translation of ER-diagram into Relational Schema
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Chapter 10 Designing Databases
Chapter 9 Designing Databases
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Chapter 17 Designing Databases
Chapter 7 Structuring System Requirements: Conceptual Data Modeling
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Presentation transcript:

Chapter 9 Designing Databases Essentials of Systems Analysis and Design Sixth Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 9 Designing Databases Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall 9.1

Process of Database Design 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 9.2 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Relational Database Model 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 9.3 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Relational Database Model (continued) 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 9.4 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Normalization The process of converting complex data structures into simple, stable data structures Eliminates redundancy (see Figure 9-6) 9.5 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Normalization (continued) 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. 9.6 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

9.7 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Primary Keys, Foreign Keys, Referential Integrity An attribute whose value is unique across all occurrences of a relation 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 9.8 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Transforming E-R Diagrams into Relations It is useful to transform the conceptual data model into a set of normalized relations Steps: Represent entities Represent relationships Normalize the relations Merge the relations 9.9 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Transforming E-R Diagrams into Relations (continued) 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 The value of the key must uniquely identify every row in the relation The key should be non-redundant 9.10 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

9.11 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Transforming E-R Diagrams into Relations (continued) 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 9.12 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

9.13 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Transforming E-R Diagrams into Relations (continued) Represent Relationships (continued) Binary or Unary 1:1 Three possible options: Add the primary key of A as a foreign key of B Add the primary key of B as a foreign key of A Both Binary and higher M:N relationships Create another relation and include primary keys of all relations as primary key of new relation 9.14 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

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

Transforming E-R Diagrams into Relations (continued) 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 9.16 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

9.17 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

9.18 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Physical File and Database Design The following information is required Normalized relations, including volume estimates Definitions of each attribute Descriptions of where and when data are used, entered, retrieved, deleted, and updated (including frequencies) Expectations or requirements for response time and data integrity Descriptions of the technologies used for implementing the files and database 9.19 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Designing Fields Choosing data types Field Data Type The smallest unit of named application data recognized by system software Each attribute from each relation will be represented as one or more fields Choosing data types Data Type A coding scheme recognized by system software for representing organizational data Four objectives: Minimize storage space Represent all possible values for the field Improve data integrity for the field Support all data manipulations desired on the field Calculated fields A field that can be derived from other database fields 9.20 Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall