Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology.

Similar presentations


Presentation on theme: "Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology."— Presentation transcript:

1 Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology

2 Copyright © 2014 Pearson Canada Inc. 5-2 Study Questions 1. Who will volunteer? 2. How are database application systems developed? 3. What are the components of the entity- relationship data model? 4. How is a data model transformed into a database design? 5. What is the user’s role? 6. Who will volunteer (continued)?

3 Copyright © 2014 Pearson Canada Inc. 5-3 Who Will Volunteer? Fundraising manager needs database to: Find volunteers Track volunteers how many years effectiveness personal information

4 Copyright © 2014 Pearson Canada Inc. 5-4 How Are Database Application Systems Developed? Database application system consists of: Database DBMS One or more database applications Database application consists of: Forms Reports Queries Application programs

5 Copyright © 2014 Pearson Canada Inc. 5-5 Database Development Process

6 Copyright © 2014 Pearson Canada Inc. 5-6 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 the data model Design implemented in a database Database filled with user data

7 Copyright © 2014 Pearson Canada Inc. 5-7 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

8 Copyright © 2014 Pearson Canada Inc. 5-8 What Are the Components of the Entity-Relationship Data Model? Techniques for creating data model Entity-relationship (E-R) data model Unified Modeling Language (UML) E-R data model components Entities (things) stored in the database Relationships among those entities

9 Copyright © 2014 Pearson Canada Inc. 5-9 Entities Some thing that users want to track e.g., Order, Customer, Salesperson, and Item May be: Physical object (e.g., Item or Salesperson) Logical construct or transaction (e.g., Order or Contract) Entity names are always singular Entities have: Attributes describe characteristics of the entity Identifier attribute (or group of attributes) whose value is associated with one and only one entity instance

10 Copyright © 2014 Pearson Canada Inc. 5-10 Student Data Model Entities

11 Copyright © 2014 Pearson Canada Inc. 5-11 Relationships Entities have relationships to 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

12 Copyright © 2014 Pearson Canada Inc. 5-12 Example of Department, Adviser, and Student Entities and Relationships

13 Copyright © 2014 Pearson Canada Inc. 5-13 E-R Diagrams 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

14 Copyright © 2014 Pearson Canada Inc. 5-14 E-R Diagram Example

15 Copyright © 2014 Pearson Canada Inc. 5-15 Cardinality Number of entities that can be involved in relationship Maximum cardinality maximum number involved Minimum cardinality constraints on minimum requirements

16 Copyright © 2014 Pearson Canada Inc. 5-16 How Is a Data Model Transformed into a Database Design? Database design is the process of converting a data model into tables, relationships, and data constraints Transforms entities into tables Expresses relationships defines foreign keys Shows data constraints

17 Copyright © 2014 Pearson Canada Inc. 5-17 Normalization Normalization is the process of converting poorly structured tables into two or more well-structured tables Data integrity problems Different names for the same entity Produces incorrect and inconsistent information Resolve by eliminating duplicated data Normalizing for Data Integrity Eliminate data duplication Slower to process Construct tables such that every table has single topic

18 Copyright © 2014 Pearson Canada Inc. 5-18 Representing Relationships

19 Copyright © 2014 Pearson Canada Inc. 5-19 Representing a 1:N Relationship

20 Copyright © 2014 Pearson Canada Inc. 5-20 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

21 Copyright © 2014 Pearson Canada Inc. 5-21 What Is the User’s Role? Final judges as to what data should contain Determine how records are related to each other Need to review data model Must insure that model reflects an accurate view of business

22 Copyright © 2014 Pearson Canada Inc. 5-22 Who Will Volunteer? (continued) 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

23 Copyright © 2014 Pearson Canada Inc. 5-23 Data Model for Volunteer Database

24 Copyright © 2014 Pearson Canada Inc. 5-24 Active Review 1. Who will volunteer? Summarize the problem that the fundraising manager must solve. Explain how a database can help solve this problem. Describe the missing information. In your own words, what data must be available to construct the missing information? 2. How are database application systems developed? Name and briefly describe the components of a database application system. Explain the difference between a database application system and a database application program. Using Figure CE5a-1 as a guide, describe the major steps in the process of developing a database application system. Explain what role is crucial for users and why that role is so important. 3. What are the components of the entity-relationship data model? Define the terms entity, attributes, and relationship. Give an example of two entities (other than those in this book) that have a 1:N relationship. Give an example of two entities that have an N:M relationship. Explain the difference between maximum and minimum cardinality. Show two entities having a 1:N relationship in which one is required and one is optional.

25 Copyright © 2014 Pearson Canada Inc. 5-25 Active Review 4. How is a data model transformed into a database design? Give an example of a data integrity problem. Describe, in general terms, the process of normalization Explain how normalizing data prevents data integrity problems. Explain the disadvantage of normalized data. Using your examples from Question 3, show how 1:N relationships are expressed in relational database designs. Show how N:M relationships are expressed in relational database designs. 5. What is the user’s role? Describe the major role for users in the development of a database application system. Explain what is required to change a 1:N relationship to an N:M relationship during the data modelling stage. Explain what is required to make that same change after the database application system has been constructed. Describe how this knowledge impacts your behaviour when a database application system is being constructed for your use.

26 Copyright © 2014 Pearson Canada Inc. 5-26 Active Review 6. Who will volunteer? (continued) Examine Figure CE5a-12. Describe the maximum and minimum cardinality for each relationship. Justify these cardinalities. Change the relationship between Prospect and Phone to N:M, and explain what this means. Change the relationship between Prospect and Work to 1:1, and explain what this means. Explain how each relationship is represented in the design in Figure CE5a-14. Show examples of both primary keys and foreign keys in this figure. In Contact, determine whether EmployeeName is part of a primary key or part of a foreign key. Explain what problem the consultant foresaw in the use of the Name attribute. Explain how that problem was avoided. The consultant added an attribute to the data model that was not part of the users’ world. Explain why that attribute will not add unnecessary complication to the users’ work experiences.


Download ppt "Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology."

Similar presentations


Ads by Google