Data Modelling Using Entity-Relationship (ER) Model

Slides:



Advertisements
Similar presentations
Entity Relationship Diagrams
Advertisements

Database Design The process of finding user requirement
Conceptual Data Modeling: ER
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
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)
Copyright © 2004 Pearson Education, Inc.. Chapter 3 Data Modeling Using the Entity-Relationship Model.
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
The (min,max) notation (1,1) (0,1) (1,N) (1,1). SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING.
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
CS 405G Introduction to Database Systems
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
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
CONCEPTS OF E-R MODEL. CONTENTS Entity Attributes Data Value Entity Types Types of Entity Types Relationships Relationship Constraints.
Lecture 2: Entity-Relationship Modeling
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Entities and Attributes
Entity-Relationship (ER) Data Model 概念資料模式 (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 4)
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 2: Representing Information with Data Models The lecture notes.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Data Modeling Using the Entity-Relationship
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 7: Modeling Data in the Organization Dr. Taysir Hassan Abdel Hamid IS Department Faculty of Computer and Information Assiut University March 8,
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:
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model Copyright © 2004 Pearson Education, Inc.
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)
Slide Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity-Relationship Model Chapter 3 II COSC 457 Sungchul Hong.
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Slide 3- 1.
Database Systems – ER Diagrams EXAMPLE COMPANY DATABASE Requirements of the Company (oversimplified to illustrate) The company is organized into DEPARTMENTs.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
Chapter 2 Data Modeling Using the Entity-Relationship (ER) Model Copyright © 2004 Pearson Education, Inc.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Conceptual Modelling The Entity-Relationship (ER) Model The ER diagram Data Modelling.
Chapter 7 Data Modeling Using the Entity-Relationship (ER) Model
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 16 July 26,2012 Data Modeling using the Entity Relationship.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Data Modeling Using the Entity- Relationship (ER) Model
Comp 1100 Entity-Relationship (ER) Model
Chapter 3 Data Modeling Using the Entity-Relationship Model
CS4222 Principles of Database System
Data Modeling Using the Entity- Relationship (ER) Model
Database Management Systems
Entity- Relationship (ER) Model
ER model Ashima Wadhwa.
Chapter -3- Data Modeling Using the Entity-Relationship Model
بسم الله الرحمن الرحيم.
Entity-Relationship Modeling "Extended"
Initial Design of Entity Types: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT Gender.
Conceptual Data Modeling Using Entities & Relationships
Entity Relation Model Tingting Zhang.
Entity-Relationship Modeling "Extended"
Presentation transcript:

Data Modelling Using Entity-Relationship (ER) Model Chapter 3 Data Modelling Using Entity-Relationship (ER) Model

Phases of Database Design

“Company” Example Database Application Description of the mini-world: The company is organized into departments. Each department has a unique name, a unique number and a particular employee who manages the department, including the date he/she began managing the department. A department may have several locations.

Cont’d… A department controls a number of projects Each project has a unique name, number and a single location

Cont’d… We record each employee’s name, SSN, address, salary, sex and birth date. Also we record who is the supervisor An employee works in one department but may work on several projects in different department We track work hours of employees in projects

Cont’d We record the dependants of each employee, including the first name, sex, birth date and relationship to the employee

ER Schema for “Company”

Entity & Attributes Entity is the “thing” either physical existence (person, car, house) or conceptual (company, course, job). Attributes are the properties of the entity Each attributes has values.

Entity, attribute & value example

Composite vs. Simple Attributes Composite attributes can be divided into smaller part. For example, address consist of Street Address City State Postal Code Simple (atomic) attributes are no longer divisble

Con’d

Single valued vs. Multi-valued Singe valued: Age Sex SSN Multi valued: Children

Other terms… Stored vs. derived values. Derived values example may include GPA, sub-totals, etc. Null values: “nothing”, not zero, not blank space!

Complex attributes Composite and multi-valued attributes can be nested in an arbitrary way () for nesting {} for multi value Example {Address&Phone ( {Phone(AreaCode, PhoneNumber)}, Address(StreetAddress(Number, Street, ApartmentNumber), City, State, Zip) ) }

Entity Type It defines the set of possible entities with the same attributes For example, ‘employee type’ is the set of employees in the company

Key Attributes of an Entity Type What makes an entity unique? An employee: SSN A company: name A project: number, name A purchase slip may have 2 keys: date & time Keys must be minimal

Value Sets Possible values of an attribute. Usually: Numeric Text Boolean Etc. But can be more specific, for example: Birth date must be > 1850 but before <(now) Sex must be either female or male

Initial Entity Concept of Company Database

Relationship Relationship type amongst entities defines a set of associations For example between an employee and a department there is a relationship Works_For. Represented as diamond shaped boxes

Degree of relationship type Binary relationship Ternary relationship

Binary rerlationship

Ternary Relationship

Recursive relationships

Constraints on relationships Cardinality ratios 1:1, the relation Manages M:N, the relation Works_On N:1, the relation Works_FOR Participation constraints For example, an employee must be working for a department (null value is impossible)

M:N Relationship

1:1 Relationship

Attribute of a relationship Yes… a relationship may include additional attributes For example Start managing in the Manages relationship

Weak Entity Dependants do not have any key on its own Why? Because there might be small chance that 2 employees have the same first name, birth date, sex for their son! Personally, I do not like weak entities (hard to query).

The New ER Diagram

Summary of ER Diagram Notations

Cont’d…