C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.

Slides:



Advertisements
Similar presentations
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Advertisements

McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module C Designing Databases and Entity-Relationship.
Extended Learning Module C
© McGraw-Hill Companies, Inc., McGraw-Hill/Irwin Extended Learning Module C Designing Databases and Entity-Relationship Diagramming.
CHAPTER 4 DATABASES AND DATA WAREHOUSES A Gold Mine of Information.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
ERD diagram Data Design - Mr. Ahmad Al-Ghoul
IT420: Database Management and Organization
Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Data Modeling and Entity- Relationship Model II. IST2102 I want a database to maintain departments in my company. Store information about my employees,
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Accounting System Design
Systems Development Life Cycle
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
DATABASES AND DATA WAREHOUSES A Gold Mine of Information
Extended Learning Module C Designing Databases and Entity-Relationship Diagramming McGraw-Hill/Irwin Copyright © 2010 by the McGraw-Hill Companies, Inc.
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Chapter 3: Modeling Data in the Organization
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
System Analysis and Design
Concepts of Database Management Seventh Edition
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Entity-Relationship Model
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
APPENDIX C DESIGNING DATABASES
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Introduction to Databases
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module C Designing Databases and Entity-Relationship.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
Concepts and Terminology Introduction to Database.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
3-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Chapter 3 Databases and Data.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Data Modeling IST210 Class Lecture.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
DirtBike Order Database– ER Diagram Prepared by (Your Name) Summer 2013.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
McGraw-Hill/Irwin ©2005 The McGraw-Hill Companies, All rights reserved ©2005 The McGraw-Hill Companies, All rights reserved McGraw-Hill/Irwin.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
Description and exemplification of entity-relationship modelling.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Lecture 91 Introduction to Data Analysis and Logic Specification Objectives l Draw an entity-relationship diagram, and explain the types of entity relationships.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
Microsoft Access 2010 Chapter 11 Database Design.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
Data Modeling and Entity-Relationship Model I
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
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.
Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology.
©2005 The McGraw-Hill Companies, All rights reserved McGraw-Hill/Irwin
Presentation transcript:

C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module C Designing Databases and Entity-Relationship Diagramming

C-2 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Presentation Overview Designing and Building A Relational Database Designing and Building A Relational Database The four primary steps for designing a database include: The four primary steps for designing a database include: 1. Defining entity classes and primary keys. 2. Defining relationships among entity classes. 3. Defining information (fields) for each relation. 4. Using a data definition language to create your database.

C-3 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Database - a collection of information that you organize and access according to the logical structure of that information. Database - a collection of information that you organize and access according to the logical structure of that information. Relational database - uses a series of logically related two-dimensional tables or files to store information in the form of a database. Relational database - uses a series of logically related two-dimensional tables or files to store information in the form of a database. Introduction

C-4 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Designing And Building A Relational Database The four primary steps include: The four primary steps include: 1. Defining entity classes and primary keys. 2. Defining relationships among entity classes. 3. Defining information (fields) for each relation. 4. Using a data definition language to create your database.

C-5 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 1: Defining Entity Classes and Primary Keys Entity class - a concept - typically people, places, or things - about which you wish to store information and that you can identify with a unique key (called the primary key). Entity class - a concept - typically people, places, or things - about which you wish to store information and that you can identify with a unique key (called the primary key). Primary key - a field (or group of fields in some cases) that uniquely describes each record. Primary key - a field (or group of fields in some cases) that uniquely describes each record. Instance - an occurrence of an entity class that can be uniquely described. Instance - an occurrence of an entity class that can be uniquely described.

C-6 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 1: Defining Entity Classes and Primary Keys What are the entity classes and primary keys for the report below? What are the entity classes and primary keys for the report below?

C-7 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 1: Defining Entity Classes and Primary Keys Employee (primary key – Employee ID) Employee (primary key – Employee ID) Job (primary key – Job Number) Job (primary key – Job Number) Department (primary key Department Num) Department (primary key Department Num) Team Work Defining Entity Classes and Primary Keys (p. 167)

C-8 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Entity-relationship (E-R) diagram - a graphic method of representing entity classes and their relationships. Entity-relationship (E-R) diagram - a graphic method of representing entity classes and their relationships.  Rectangle – entity class  Dotted line – relationship  | - single relationship  O – zero or optional relationship  Crow’s foot (  ) – multiple relationship

C-9 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes An E-R diagram for our Employee database. An E-R diagram for our Employee database.

C-10 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Team Work Defining Relationships Among Entity Classes (p. 169)

C-11 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Employee-Department: An Employee is assigned to one Department at a minimum and one Department at a maximum. Employee-Department: An Employee is assigned to one Department at a minimum and one Department at a maximum.

C-12 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Department-Employee: A Department is not required to have any Employees assigned to it but may have many Employees assigned to it. Department-Employee: A Department is not required to have any Employees assigned to it but may have many Employees assigned to it.

C-13 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes All statements you derive from an E-R diagram should mirror the business rules at hand. All statements you derive from an E-R diagram should mirror the business rules at hand. Team Work Defining the Cardinality Among Entity Classes (p. 169)

C-14 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Now it’s time to employ normalization. Now it’s time to employ normalization. Normalization - a process of assuring that a relational database structure can be implemented as a series of two- dimensional relations. Normalization - a process of assuring that a relational database structure can be implemented as a series of two- dimensional relations.

C-15 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Three rules of normalization: Three rules of normalization: 1. Eliminate repeating groups or many-to-many relationships. 2. Assure that each field in a relation depends only on the primary key for that relation. 3. Remove all derived fields from the relations.

C-16 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes To eliminate repeating groups (many-to- many relationships) you must, create an intersection relation. To eliminate repeating groups (many-to- many relationships) you must, create an intersection relation. The figure on the next slide shows a many-to-many relationship and the intersection relation that eliminates it. The figure on the next slide shows a many-to-many relationship and the intersection relation that eliminates it.

C-17 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes The intersection relation (Job Assignment) uses a composite primary key. The intersection relation (Job Assignment) uses a composite primary key.

C-18 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Intersection relation - a relation you create to eliminate a many-to-many relationship. Intersection relation - a relation you create to eliminate a many-to-many relationship. Composite primary key - consists of the primary key fields from the two intersecting relations. Composite primary key - consists of the primary key fields from the two intersecting relations. Foreign key - a primary key of one file (relation) that appears in another file (relation). Foreign key - a primary key of one file (relation) that appears in another file (relation).

C-19 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Guidelines for creating an intersection relation: Guidelines for creating an intersection relation: 1. Draw the part of the E-R diagram that contains a many-to-many relationship. 2. Underneath each relation for which the many-to- many relationship exists, write down some of the primary keys. 3. Create a new E-R diagram (showing no cardinality) with the original two relations on each end and a new one in the middle. 4. Underneath the intersection relation, write down some composite primary keys.

C-20 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes 5. Create a meaningful name for the intersection relation. 6. Move the minimum cardinality appearing next to the left relation just to the right of the intersection relation. 7. Move the minimum cardinality appearing next to the right relation just to the left of the intersection relation. 8. The maximum cardinality on both sides of the intersection relation will always be “many”. 9. The new minimum and maximum cardinalities for the two original relations will be one and one.

C-21 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 2: Defining Relationships Among Entity Classes Team Work Creating an Intersection Relation (p. 174)

C-22 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 3: Defining Information (Fields) for Each Relation Your goal in this step to make sure that the information in each relation is indeed in the correct relation and that the information cannot be derived from other information – the second and third rules of normalization. Your goal in this step to make sure that the information in each relation is indeed in the correct relation and that the information cannot be derived from other information – the second and third rules of normalization.

C-23 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 3: Defining Information (Fields) for Each Relation

C-24 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 3: Defining Information (Fields) for Each Relation Department Name does not belong in the Employee relation. Department Name does not belong in the Employee relation.  It depends on Department Num.  It does not depend on Employee ID. Num of Employees does not belong in the Department relation. Num of Employees does not belong in the Department relation.  It can be derived by counting employees in the Employee relation.

C-25 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 3: Defining Information (Fields) for Each Relation

C-26 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 3: Defining Information (Fields) for Each Relation On Your Own Creating the Final Structure for Your School (p. 177)

C-27 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 4: a Data Definition Language to Create Your Database. Step 4: Using a Data Definition Language to Create Your Database. The final step in developing a relational database is to take the structure you created in steps 1 to 3 and use a data definition language to actually create the relation. The final step in developing a relational database is to take the structure you created in steps 1 to 3 and use a data definition language to actually create the relation. Read Module J on the CD to learn how to do this with Microsoft Access. Read Module J on the CD to learn how to do this with Microsoft Access.

C-28 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Step 4: a Data Definition Language to Create Your Database Step 4: Using a Data Definition Language to Create Your Database The data definition language is part of the DBMS. The data definition language is part of the DBMS. Database management system (DBMS) - helps you specify the logical organization for a database and access and use the information within the database. Database management system (DBMS) - helps you specify the logical organization for a database and access and use the information within the database.

C-29 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Summary Student Learning Outcomes 1. Identify how databases and spreadsheets are both similar and different. 2. List and describe the four steps in designing and building a relational database. 3. Define the concepts of entity class, instance, primary key, and foreign key.

C-30 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Summary Student Learning Outcomes 4. Given a small operating environment, build an entity-relationship (E-R) diagram. 5. List and describe the steps in normalization. 6. Describe the process of creating an intersection relation to remove a many- to-many relationship.

C-31 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Summary Assignments and Exercises 1. Defining entity classes for the music industry 2. Defining business rules for a video rental store 3. Creating an E-R diagram for a video rental store 4. Eliminating a many-to-many relationship

C-32 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Summary Assignments and Exercises 5. Defining the cardinality among two entity classes 6. Making some changes to your school’s offering of weekend seminars 7. Making some changes to your employee database