Entity Relation Model Tingting Zhang.

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model (part I)
Advertisements

Entity-Relationship Model
Text-Book Chapters (7 and 8) Entity-Relationship Model
Data modeling using the entity-relationship model Sept. 2012Yangjun Chen ACS Outline: Data modeling using ER-model (Chapter 3 - 3rd, 4th, 5th ed.)
CS157A Lecture 3 ER Diagram Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Databases Revision.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Conceptual Models Agenda - Steps in the design of a DB - Need for conceptual models - The Entity-Relationship Model (ER-Model)
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
ENTITY RELATIONSHIP DATA MODEL ELIZABETH GEORGE. INTRODUCTION Architect Aeronautical engineers Computer architects Traffic engineers.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity-Relationship Model
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
the Entity-Relationship Model
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Continued)
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
Entity-Relationship Model Chapter 3 II COSC 457 Sungchul Hong.
Data Modelling Using Entity-Relationship (ER) Model
Data Modeling Using the Entity-Relationship (ER) Data Model.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Entity-Relationship Data Model
Chapter 2: Entity-Relationship Model
Data Modeling Using the Entity- Relationship (ER) Model
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Comp 1100 Entity-Relationship (ER) Model
Entity-Relationship Model
Chapter 3 Data Modeling Using the Entity-Relationship Model
CS4222 Principles of Database System
Data Modeling Using the Entity- Relationship (ER) Model
Entity- Relationship (ER) Model
ER model Ashima Wadhwa.
Entity-Relationship Model
Entity Relationship Model
Entity-Relationship Model
Chapter 2: Entity-Relationship Model
Chapter -3- Data Modeling Using the Entity-Relationship Model
Chapter 7 Entity-Relationship Model
Outline of the ER Model By S.Saha
ER MODEL Lecture 3.
Lecture3: Data Modeling Using the Entity-Relationship Model.
بسم الله الرحمن الرحيم.
Entity Relationship Diagrams
Entity-Relationship Model
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Session 2 Welcome: The fifth learning sequence
Database Modeling using Entity Relationship Model (E-R Model)
Chapter 6: Entity-Relationship Model
Conceptual Data Modeling Using Entities & Relationships
Chapter 7: Entity-Relationship Model
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Entity-Relationship Diagram (ERD)
Mapping an ERD to a Relational Database
Chapter 2: Entity-Relationship Model
Entity-Relationship Data Model
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

Entity Relation Model Tingting Zhang

ER Model Developed by P. Chen in 1976 One of the powerful uses of ER modeling is to assure that the data model reflects the user requirements.

Entity An entity is a thing that has an independent existence Ex: Mittuniversity ITM L111 DATB03

Entity types Define a set of entities of the same type (share the same structure) EX: Entity type Entity University Mittuniversity Department ITM Class room L111 Course DATB03

Attributes An entity is described by its attributes. EX: Name E-mail ID # Address Telephone #

Attributes Domain – the set of permitted values for each attribute Attribute types: Simple and composite attributes. Single-valued and multi-valued attributes E.g. multivalued attribute: phone-numbers Derived attributes Can be computed from other attributes E.g. age, given date of birth

Composite Attributes

Attributes in ER diagrams Simple single value attribute Simple multi valued attribute Composite Attributes Birth date telephones name Last name First name

Key An entities of an enetity type usually has an or set of attributes whoes values are distnct for each individual entity in the entity type. Key in ER diagram Department name

Null values Null: an unknown value or empty value Used when Do not know the value of an attributed for a particular entity. A particular entity may not have an applicable value for an attribute.

Entity Type in ER model Name ID# telephone Customer address

Relation ship A relationship is an association among several entities Example: Hayes borrower A-102 customer loan entity relationship entity

Relationship type A relationship type among n entity E1, …, En defines a relationship set. The relationship set is a set of relationship r among n  2 entities, each taken from entity sets {(e1, e2, … en) | e1  E1, e2  E2, …, en  En} where (e1, e2, …, en) is a relationship

Relationship Type in ER diagrams

Relationship degree (I) One to one One to many

Relationship degree in ER diagrams (I.1) address name Manage 1 1 Manager Department address name ID#

Relationship degree in ER diagrams (I.2) 1 M

Relationship degree (II) Many to one Many to many

Relationship degree in ER diagrams (II.1) Employee department Works-for M 1 ID# address name location

Relationship degree in ER diagrams (II.2) Employee Project Works-On M N ID# address name description

Roles Each entity type that participates in a relationship type plays a particular role in the relationship. Role name signifies the role that a participating entity from the entity type plays in each relationship instance Roles are indicated in E-R diagrams by labeling the lines that connect diamonds to rectangles. Role labels are optional, and are used to clarify semantics of the relationship

Roles in ER diagrams

Constraints on Relationship types Cardinality ratios for binary relationships Employee department Works-for M 1 Cardinality ratios: Employee department Works-for 1:1 4:N

Participation of an Entity Set in a Relationship Set Total participation (indicated by double line): every entity in the entity set participates in at least one relationship in the relationship set E.g. participation of loan in borrower is total every loan must have a customer associated to it via borrower Partial participation: some entities may not participate in any relationship in the relationship set E.g. participation of customer in borrower is partial

Constraints on Relationship types Participation in ER diagram

Cardinality ratios for binary relationships 1:1

Attributes of relationship types Relationship types can have attributes Employee project Works-on M N Hours per week ID# address name description

Weak entity (I) An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the existence of a identifying entity set it must relate to the identifying entity set via a total, one-to-many relationship set from the identifying to the weak entity set Identifying relationship depicted using a double diamond

Weak entity (II) The partial key of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set. The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence dependent, plus the weak entity set’s discriminator.

Weak entity (III) M Employee Dependents-of dependent address ID# First name M 1 Employee Dependents-of dependent Birth date First name Last name The partial key is first name

An example database application The company is organized into departments. Each department has a unique name, a unique number, and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A department may have several locations. A department controls a number of projects, each of which has a unique name, a unique number, and a single location We store each employee’s name, social security number, address, salary, sex and birth date. An employee is assigned to one department but may work on several projects, which are not necessarily controlled by the same department. We keep track of the number of hours per week that an employee works on each project. We also keep track of the direct supervisor of each employee. We want to track of the dependents of each employee for insurance purposes. We keep each dependent’s first name, sex birth date, and relationship to the employee.