IT420: Database Management and Organization

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
Entity Relationship (ER) Modeling
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Entity-Relationship Model
Entity-Relationship (E-R) modeling: constructing a conceptual schema (Chapter 5) Due to course constraints I have to defer other modeling issues (normalization.
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Entity-Relation Modeling Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
System Analysis - Data Modeling
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
Chapter Five Data Modeling with the Entity-Relationship Model.
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
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.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Entity-Relationship Model
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 7.
Modern Systems Analysis and Design Third Edition
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
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 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
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.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 5 Entity–Relationship Modeling
Entity Relationship Diagrams Objectives s Learn the Elements of the E-R model (entities, attributes, and relationships) s Show how to apply the E-R model.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Data Modeling IST210 Class Lecture.
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.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
Component 4/Unit 6b Topic II Relational Databases Keys and relationships Data modeling Database acquisition Database Management System (DBMS) Database.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Requirements Become the E-R Data Model
Database Design – Lecture 4
IDEF1X Standard IDEF1X (Integrated Definition 1, Extended) was announced as a national standard in 1993 It defines entities, relationships, and attributes.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Database Processing: David M. Kroenke’s Chapter Five:
Entity Relationship (ER) Modeling
Presentation transcript:

IT420: Database Management and Organization Introduction to ER Model Adina Crăiniceanu www.cs.usna.edu/~adina

Lab Lab 1 due next Tuesday (January 17) before class You do not have to enforce the rule Landing > Takeoff Send created database to adina@usna.edu

Last Time Why Database Management Systems? Microsoft Access Transactions High-level abstractions for data access, manipulation, and administration Data integrity and security Performance and scalability Microsoft Access

Goals of This Lecture Understand the Entity-Relationship Model

Database Design Process Requirements analysis Conceptual design  data model Logical design Schema refinement: Normalization Physical tuning

Conceptual Design Overview ER Model What are the entities and relationships in the enterprise? What information about these entities and relationships should we store in the database? What are the integrity constraints or business rules that hold?

Data Model A data model is a plan, or blueprint, for a database. General Abstract (no implementation suggested) Easy to change

ER Model Entity-Relationship model: set of concepts and graphical symbols Versions Original E-R model — Peter Chen (1976) Extended E-R model — Extensions to the Chen model Information Engineering (IE) — James Martin (1990) “Crow’s foot” notation IDEF1X — A national standard developed by the National Institute of Standards and Technology Unified Modeling Language (UML) — The Object Management Group; it supports object-oriented methodology

Entities Something that can be identified and the users want to track Entity class — a collection of entities of a given type Entity instance — the occurrence of a particular entity There are usually many instances of an entity in an entity class.

CUSTOMER

Attributes Attributes: describe the characteristics of an entity Entity instances: Same attributes Different values

EMPLOYEE: Attributes in Ellipses

EMPLOYEE: Attributes in Rectangle

Identifiers Identifiers = attributes that identify entity instances Composite identifiers: Identifiers that consist of two or more attributes Identifiers in data models become keys in database designs: Entities have identifiers. Tables (or relations) have keys.

Entity Attributes Display in Data Models

Relationships Relationships: associations between entities Relationship classes: associations among entity classes Relationship instances: associations among entity instances No attributes Relationship degree: Number of entities in the relationship

Binary Relationship

Ternary Relationship

Cardinality Cardinality means “count,” and is expressed as a number Maximum cardinality: maximum number of entity instances that can participate in a relationship Minimum cardinality: minimum number of entity instances that must participate in a relationship

Maximum Cardinality Maximum cardinality: maximum number of entity instances that can participate in a relationship One-to-One [1:1] One-to-Many [1:N] Many-to-Many [N:M]

The Three Types of Maximum Cardinality

HAS-A Relationships Previous relationships: HAS-A relationships: Each entity instance has a relationship with another entity instance: An EMPLOYEE has one BADGE A BADGE has an assigned EMPLOYEE.

Minimum Cardinality Minimum cardinality: minimum number of entity instances that must participate in a relationship. zero [0]  participation is optional one [1]  participation is mandatory

Indicating Minimum Cardinality Minimum cardinality of zero [0]: oval next to the optional entity. Minimum cardinality of one [1]: vertical hash mark next to the required entity.

The Three Types of Minimum Cardinality

Data Modeling Notation (b) Crow’s foot version (ERWin)

Data Modeling Notation: ERwin

Data Modeling Notation: N:M and O-M Note that: (1) ERwin cannot indicate true minimum cardinalities on N:M relationships (2) Visio introduces the intersection table instead of using a true N:M model

ID-Dependent Entities ID-dependent entity: entity (child) whose identifier includes the identifier of another entity (parent) Example: BUILDING : APARTMENT PAINTING : PRINT Minimum cardinality from the ID-dependent entity to the parent is always one

ID-Dependent Entities A solid line indicates an identifying relationship

Weak Entities A weak entity is an entity whose existence depends upon another entity. All ID-Dependent entities are considered weak. But there are also non-ID-dependent weak entities. The identifier of the parent does not appear in the identifier of the weak child entity.

Weak Entities (Continued) Weak entities must be indicated by an accompanying text box in Erwin – There is no specific notation for a nonidentifying but weak entity relationship A dashed line indicates a nonidentifying relationship

ID-Dependent and Weak Entities ID-Dependent entity: Identifier depends includes another identifier Identifying relationship Ex: BUILDING:APARTMENT Weak entity: existence depends on another entity Ex: MODEL:CAR ID-Dependent  Weak Weak does NOT imply ID-Dependent

Subtype Entities Subtype entity: special case of a supertype entity: STUDENT : UNDERGRADUATE or GRADUATE Supertype: all common attributes [discriminator attribute] Subtypes: specific attributes.

Subtypes with a Discriminator

Subtypes: Exclusive or Inclusive If subtypes are exclusive, one supertype relates to at most one subtype. If subtypes are inclusive, one supertype can relate to one or more subtypes.

Subtypes: Exclusive or Inclusive

Subtypes: IS-A relationships IS-A relationships: a subtype IS A supertype. Supertype and subtypes identifiers are identical Use subtypes if Have attributes that make sense only for subtypes Want to specify a relationship only for subtype or supertype

Class Exercise Draw ER diagram for a database used to manage IT420 class (at least 3 entities) Specify entities, attributes, identifiers Specify relationships Specify cardinalities for relationships

ER Modeling: Case Study Drugwarehouse.com has offered you a free life-time supply of prescription drugs (no questions asked) if you design its database schema. Given the rising cost of health care, you agree. Here is the information that you gathered: Patients are identified by their SSN, and we also store their names and age Doctors are identified by their SSN, and we also store their names and specialty Each patient has one primary care physician Each doctor has at least one patient

For Next Time Read Chapter 5