22
Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

  • View
    233

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Chapter Extension 5

Database Design

© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Page 2: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-2 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Study Questions

Who will volunteer? How are database application systems developed? What are the components of the entity-relationship

data model? How is a data model transformed into a database

design? What is the user’s role? Who will volunteer?

Page 3: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-3 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Who Will Volunteer?

Fundraising manager needs database to:– Track volunteers

How many years Effectiveness Personal information

Page 4: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-4 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Database Application Systems

Database application consists of:– Forms– Reports– Queries– Application programs

Page 5: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-5 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

How Are Systems Developed?

Figure CE5-1

Page 6: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-6 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Database Application System Development Process

Developers interview users Develop requirements for new system

– Analyze existing reports, forms, and user activities

Requirements summarized in data model– Logical representation of structure of data– Contains description of data and relationships

Users validate and approve model Design implemented in a database

– Database filled with user data

Page 7: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-7 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Database

Must include all data necessary for users to perform jobs

Contains only that amount of data, and no more

Developers rely on users to:– Tell them what to include– Check data model– Verify correctness and completeness

Page 8: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-8 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Entity-Relationship Data Model

Techniques for creating data model– Entity-relationship data model

E-R data model

– Unified Modeling Language UML

Database content– Entities stored in database and relationship

among those things

Page 9: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-9 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Entities

Something that users want tracked May be:

– physical object– Logical construct– Transaction

Always singular

Page 10: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-10 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Entities (continued)

Have:– Attributes

Describe characteristics

– Identifier Attribute whose value is associated with one and only

one entity instance

Page 11: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-11 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

E-R Diagrams

Figure CE5-5

Figure CE5-6

Page 12: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-12 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

E-R Diagrams (continued)

Rectangles represent entities Relationships shown by lines Crow’s foot

– Forks at end of lines – Indicate more than one relationship– Read “many”

Vertical line means at least one entity of that type Small oval means entity is optional

Page 13: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-13 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Relationships

Entities have relationships with each other 1:1 relationship

– Single entity to single entity 1:N relationship

– One-to-many– Single entity to many entities

N:M– Many-to-many

Page 14: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-14 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Database Design

Process of converting data model – Transforms entities into tables– Expresses relationships

Defines foreign keys

– Shows data constraints

Page 15: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-15 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Normalization

Process– Converts table into two or more tables– Changes from poorly structured to well-structured

Data integrity problems– Different names for the same entity– Produces incorrect and inconsistent information– Resolve by eliminating duplicated data

Normalized tables– Eliminate data duplication– Slower to process– Every table has single topic

Page 16: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-16 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Cardinality

Number of entities that can be involved in relationship– Maximum cardinality

Maximum number involved

– Minimum cardinality Constraints on minimum requirements

Page 17: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-17 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Relational Database Construction

Figure CE5-10

Page 18: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-18 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Page 19: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-19 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Relational Database Design

Designer creates table for every entity Entity identifier becomes primary key of table Attributes of entity become columns Tables normalized to single theme Represent relationships between tables Add foreign key to one or more tables

Page 20: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-20 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

What Is the Users’ Role?

Final judges as to what data should be contained

Determine how records are related to each other

Need to review data model Must insure that model reflects an accurate

view of business

Page 21: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-21 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Who Will Volunteer?

Consultant creates data model– Based on interviews with users

Data model reviewed and approved Database tables constructed

– Primary and foreign keys selected Based on interviews

Microsoft Access database created– Relationships indicated– Forms and reports constructed

Page 22: Chapter Extension 5 Database Design © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 5-22 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Active Review

Who will volunteer? How are database application systems developed? What are the components of the entity-relationship

data model? How is a data model transformed into a database

design? What is the user’s role? Who will volunteer?