1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.

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 3 Data Modeling Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
IT420: Database Management and Organization
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Accounting System Design
Systems Development Life Cycle
Database Design & Mapping
Systems Development Life Cycle
Entity-Relationship Model and Diagrams (continued)
Extended Learning Module C Designing Databases and Entity-Relationship Diagramming McGraw-Hill/Irwin Copyright © 2010 by the McGraw-Hill Companies, Inc.
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 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Implementing an REA Model in a Relational Database
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Chapter 3 Data Modeling Fundamentals of Database Management Systems by
APPENDIX C DESIGNING DATABASES
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Introduction to Databases
Chapter 6 The Relational Database Model: Additional Concepts
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
ระบบฐานข้อมูลขั้นสูง (Advanced Database Systems) Lecturer AJ. Suwan Janin Phone:
Chapter 3: Modeling Data in the Organization
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Chapter 4 The Relational Model.
Relational DB Components
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module C Designing Databases and Entity-Relationship.
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
Fundamentals of Database Management Systems, 2nd ed
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
Concepts and Terminology Introduction to Database.
Lecture 12 Designing Databases 12.1 COSC4406: Software Engineering.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
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.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
IMS 4212: Introduction to Data Modeling—Relationships 1 Dr. Lawrence West, Management Dept., University of Central Florida Relationships—Topics.
Relational Theory and Design
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Lecture 91 Introduction to Data Analysis and Logic Specification Objectives l Draw an entity-relationship diagram, and explain the types of entity relationships.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Logical Database Design and the Relational Model.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 12 Designing.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
Database Design Chapters 17 and 18.
Chapter 4: Logical Database Design and the Relational Model
Chapter 5: Logical Database Design and the Relational Model
Tables and Their Characteristics
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Design Chapters 17 and 18.
Presentation transcript:

1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Session 4 Data Modeling ITE 252 Database Management

2 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A A transactional database must support which of the following activities? a)adding new data b)changing existing data c)deleting data d)all of the above

3 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A A transactional database must support which of the following activities? a)adding new data b)changing existing data c)deleting data d)all of the above

4 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Your design must ensure that any customer purchases at least $20.00 in merchandise. This is an example of which of the following? a)entity definition b)business rule c)attribute d)relational integrity

5 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Your design must ensure that any customer purchases at least $20.00 in merchandise. This is an example of which of the following? a)entity definition b)business rule c)attribute d)relational integrity

6 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Entities and attributes are identified during logical design. True or False?

7 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Entities and attributes are identified during logical design. True or False?

8 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Each table in your database typically represents which of the following? a)an entity b)an attribute c)a relationship d)a data diagram

9 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Each table in your database typically represents which of the following? a)an entity b)an attribute c)a relationship d)a data diagram

10 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A You are defining an employee entity. Which of the following would you likely use as the identifier (primary key)? a)first name b)last name c)employee ID d)hire date e)none of the above

11 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A You are defining an employee entity. Which of the following would you likely use as the identifier (primary key)? a)first name b)last name c)employee ID d)hire date e)none of the above

12 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A A foreign key is based on a unique value in the referenced entity. True or False?

13 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A A foreign key is based on a unique value in the referenced entity. True or False?

14 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Which statement best describes attributes? a)You should have a table for each attribute defined in your model. b)Any attribute can be used as an entity’s identifier. c)Attributes describe entities. d)Attributes are used in object modeling only.

15 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Which statement best describes attributes? a)You should have a table for each attribute defined in your model. b)Any attribute can be used as an entity’s identifier. c)Attributes describe entities. d)Attributes are used in object modeling only.

16 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Which statement best describes an identifier? a)The identifier must be defined by a single attribute. b)It is seldom necessary to specify an identifier for an entity. c)An identifier must uniquely identify an entity.

17 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Q & A Which statement best describes an identifier? a)The identifier must be defined by a single attribute. b)It is seldom necessary to specify an identifier for an entity. c)An identifier must uniquely identify an entity.

18 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Database Design

19 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Modeling Goals Design with understanding that: – All applications written for database are dependent on database structure – If database is altered, applications may need to be altered or rewritten Support business objectives Simple, easy-to-read, easy-to-comprehend structure Scalability

20 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Business Rules Business rules: – Processes and flows used in organization’s daily work, including: Organizational policies Calculations and formulas Rules and regulations Database systems should support business rules – Some rules may be better enforced by database design – Others may be better handled through database application

21 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Entity-Relationship (E-R) Modeling Entities: – “Things” to track in database Physical objects (people or products) Conceptual entities (loan balances or interest rates)

22 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Entity-Relationship (E-R) Modeling Attributes: – Information tracked about entity – Each entity has attributes – For example: Entity: Employees Attributes: Hire Date, Pay Rate, Social Security ID, Employee Number, Home Address – One attribute used as unique identifier or primary key

23 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Entity-Relationship (E-R) Modeling Relationships: – When one entity references information from another entity – For example: Time Card entity must reference an Employee entity – Time Card entity is referencing entity – Employee entity is referenced entity – Primary keys ensure referential integrity

24 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Entity-Relationship (E-R) Modeling The employee identifier is included with each time card as a foreign key and ensures referential integrity. A foreign key is always based on a unique value in the referenced entity.

25 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Basic Database Objects Tables: Store unique instances of entity – Columns (fields) represent attributes – Rows (records) represent individual occurrences of that entity Views: – Customized representations of table information

26 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Basic Database Objects

27 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Basic Database Objects Index: – Organizes and sorts data – Provides pointer to specific physical location of data on storage media – May be: Primary or secondary Clustered (physically sorted in index order in the table) or nonclustered (indexed only) – Balanced-tree index (b-tree, or binary tree index): Most common type of index in modern databases

28 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management B-Tree Index

29 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Relationship Types Three basic types: – Binary relationship: Relationship between two types of entities – Unary relationship: Relationship with another occurrence within same entity – Ternary relationship: Relationship directly involving three entity types

30 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Relationship Types Cardinality: – Sets maximum number of entities in relationship One-to-one One-to-many Many-to-many Modality: – Sets minimum number of entities in relationship

31 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Binary Relationships Simplest type of relationship Majority of relationships in most relational databases are binary relationships Entity can have separate binary relationships with any number of other entities in database

32 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Binary Relationships Cardinality – maximum Modality – minimum L to R: A sales person works in exactly one office (minimun of one and a maximum of one office) R to L: An office may be worked in or assigned to a minimum of no sales persons (office is empty)or a maximum of one salesperson.

33 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Binary Relationships L to R: A sales person sells to many customers (or no customers – new employee) R to L: Customer is always assigned to exactly one person Crow’s Foot - multiple

34 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Binary Relationships L to R: A sales person sells at least one or many products R to L: Each product can be sold by at least one or many of the salespersons

35 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Unary Relationships Occurrences of an entity type are associated with other occurrences of same entity type – Relate data in a table to itself For example: – Entity (table) Salesperson – One salesperson may act as a backup or stand-in for another

36 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Unary Relationships Each salesperson has a guaranteed backup

37 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Unary Relationships L to R: Salesperson is not a sales manager (zero modality ) or is a sales manager with several subordinate sales persons R to L: Salesperson is managed by exactly one other salesperson

38 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Unary Relationships Bill of Materials problem. Basic parts make subassemblies; subassemblies make bigger subassemblies

39 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Ternary Relationships Involve three different entities Can be considered sets of binary relationships

40 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Ternary Relationships Intersection Data – date of the sale & number of units of the product sold Special five sided intersection data box - describes relationship b’twn two entities

41 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Many-to-Many Relationships Help minimize wasted space and optimize performance Intersection data: – Data that is part of many-to-many relationship and associated with specific, unique instance of related entities Associative entities: – Entity designed to associate key values from two entities in many-to-many relationship

42 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Many-to-Many Relationships

43 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Associative Entities The unique identifier of an associative entity is the combination of the unique identifiers of the two entities in the many-to-many relationships. e.g., a combination of Salesperson Number & Product Number Attributes

44 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management Does Your Brain Hurt Yet?

45 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management international, open membership, not- for-profit technology standards consortium. Homework Read Chapter Three, pp