Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.

Slides:



Advertisements
Similar presentations
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Advertisements

Chapter Physical Database Design Methodology Software & Hardware Mapping Logical Design to DBMS Physical Implementation Security Implementation Monitoring.
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
© 2005 by Prentice Hall Chapter 3a Database Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
IS 4420 Database Fundamentals Chapter 6: Physical Database Design and Performance Leon Chen.
Data Storage Formats Files Databases
Designing Databases Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Physical Database Monitoring and Tuning the Operational System.
© 2005 by Prentice Hall 1 Chapter 6: Physical Database Design and Performance Modern Database Management 7 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
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.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
10-1 Chapter 10 Designing Databases Modern Systems Analysis and Design Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 Part 2: File Organization and Performance Modern Database Management 10 th Edition.
Chapter 6 Physical Database Design. Introduction The purpose of physical database design is to translate the logical description of data into the technical.
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.
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.
Software School of Hunan University Database Systems Design Part III Section 5 Design Methodology.
© 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.
TM 7-1 Copyright © 1999 Addison Wesley Longman, Inc. Physical Database Design.
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 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
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,
Database Management COP4540, SCS, FIU Physical Database Design (ch. 16 & ch. 3)
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.
Chapter 13 Designing Databases Systems Analysis and Design Kendall & Kendall Sixth Edition.
File and Database Design Class 22. File and database design: 1. Choosing the storage format for each attribute from the logical data model. 2. Grouping.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
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. 
9-1 © Prentice Hall, 2007 Topic 9: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Physical Database Design DeSiaMorePowered by DeSiaMore 1.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
11-1 © Prentice Hall, 2004 Chapter 11: Physical Database Design 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 4: Logical Database Design and the Relational Model
Chapter 9 Designing Databases
Physical Database Design
Physical Database Design and Performance
MIS 322 – Enterprise Business Process Analysis
Modern Systems Analysis and Design Third Edition
Chapter 4 Relational Databases
Translation of ER-diagram into Relational Schema
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE
Chapter 9 Designing Databases
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 9 Designing Databases
Physical Database Design
Chapter 12 Designing Databases
Chapter 10 Designing Databases
Chapter 9 Designing Databases
Chapter 17 Designing Databases
Presentation transcript:

Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1

Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.2

Transforming E-R Diagrams into Relations  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.Create Tables Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.3

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

Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.5

Transforming E-R Diagrams into Relations (continued) 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 on the right side  The one side migrates to the many side Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.6

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

Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.8

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 Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.9

Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.10

Transforming E-R Diagrams into Relations (continued) 3. Merging Relations (View Integration)  Purpose is to remove redundant relations  A well designed ERD that is normalized should not have 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 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.11

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 Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.12

Designing Fields  Field  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 Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.13

Controlling Data Integrity  Default Value  A value a field will assume unless an explicit value is entered for that field  Input Mask  A pattern of codes that restricts the width and possible values for each position of a field  Range Control  Limits range of values that can be entered into field  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  Null Value  A special field value, distinct from 0, blank or any other value, that indicates that the value for the field is missing or otherwise unknown Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.14

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

Designing Physical Tables  Relational Database is a Set of Related Tables  Physical Table  A named set of rows and columns that specifies the fields in each row of the table  Design Goals  Efficient use of secondary storage (disk space)  Disks are divided into units that can be read in one machine operation  Space is used most efficiently when the physical length of a table row divides close to evenly with storage unit Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.16

Designing Physical Tables (continued)  Design Goals (continued)  Efficient data processing  Data are most efficiently processed when stored next to each other in secondary memory Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.17

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

Designing Physical Tables (continued)  Arranging Table Rows  Physical File  A named set of table rows stored in a contiguous section of secondary memory  Each table may be a physical file or whole database may be one file, depending on database management software utilized Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.19

Designing Physical Tables (continued)  File Organization  A technique for physically arranging the records of a file  Objectives for choosing file organization: 1.Fast data retrieval 2.High throughput for processing transactions 3.Efficient use of storage space 4.Protection from failures or data loss 5.Minimizing need for reorganization 6.Accommodating growth 7.Security from unauthorized use Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.20

Designing Physical Tables (continued)  Types of File Organization  Sequential  The rows in the file are stored in sequence according to a primary key value  Updating and adding records may require rewriting the file  Deleting records results in wasted space  Indexed  The rows are stored either sequentially or non-sequentially and an index is created that allows software to locate individual rows  Index A table used to determine the location of rows in a file that satisfy some condition  Secondary Index Index based upon a combination of fields for which more than one row may have same combination of values Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.21

Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.22

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

Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.24

Designing Physical Tables (continued)  Guidelines for choosing indexes 1.Specify a unique index for the primary key of each file 2.Specify an index for foreign keys 3.Specify an index for nonkey fields that are referenced in qualification, sorting, and grouping commands for the purpose of retrieving data  Hashed File Organization  The address for each row is determined using an algorithm Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.25

Designing Controls for Files  Backup Techniques  Periodic backup of files  Transaction log or audit trail  Change log  Data Security Techniques  Coding, or encrypting  User account management  Prohibiting users from working directly with the data; users work with a copy which updates the files only after validation checks Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 9.26