Lecture 5 Entity Relationship Modeling

Slides:



Advertisements
Similar presentations
Entity Relationship Diagrams
Advertisements

Entity-Relationship (ER) Modeling
ENTITY RELATIONSHIP MODELLING
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Text-Book Chapters (7 and 8) Entity-Relationship Model
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity Relationship Diagrams
Review Questions What is data modeling? What is the actual data model that is created called? Data modeling is a technique for organizing and documenting.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Ch5: Software Specification. 1 Descriptive specifications  Describe desired properties of system  Three types:
1–1 The E-R Model Prof. Sin-Min Lee Department of Computer Science.
Information Resources Management January 30, 2001.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Entity-Relationship Diagrams
1 Data Modelling Which data to include in the database.
Entity/Relationship Modelling
CS 405G Introduction to Database Systems
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
Entity-Relationship Diagrams
Yong Choi School of Business CSUB
Data Modeling Using the Entity-Relationship Model
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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,
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.
Structured Analysis Techniques
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
1 Desing Database Systems. 2 Hierarchy database The structure of data is like a tree Parent-children relationship Pointers Central depot West depotEast.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
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
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 1 © Akhilesh Bajaj, 2000, 2002, 2003, 2004.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Dr. Ahmad R. Hadaegh A.R. Hadaegh California State University San Marcos (CSUSM) Page 1 Entity Relational Diagram (ERD) Modeling This particular lecture.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Degree Indicates number of entities or participants.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 7 Data Modeling with Entity Relationship Diagrams
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Lesson 4: The Relational Model. Lesson Overview Database Design Entities Relationships E-R Diagrams.
Entity/Relationship Modelling. Entity Relationship Modelling In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
LECTURE 1: Entity Relationship MODEL. Think before doing it! Like most of the software projects, you need to think before you do something. Before developing.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
ENTITY-RELATIONSHIP MODELLING. Objectives: How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated with ER model.
C_ITIP211 LECTURER: E.DONDO. Unit 4 : DATA MODELING.
Data Modeling Using the Entity- Relationship (ER) Model
Entity/Relationship Modelling
Data Modeling Using the ERD
Entity-Relationship Model
Entity- Relationship (ER) Model
ER model Ashima Wadhwa.
Entity-Relationship Model
Entity Relationship Model
Chapter -3- Data Modeling Using the Entity-Relationship Model
بسم الله الرحمن الرحيم.
Entity Relationship Diagrams
Database Modeling using Entity Relationship Model (E-R Model)
Entity-Relationship Diagram (ERD)
Entity Relation Model Tingting Zhang.
Presentation transcript:

Lecture 5 Entity Relationship Modeling Software Engineering Lecture 5 Entity Relationship Modeling

Entity-Relationship Model Technique for carrying out the conceptual and logical design of the system A widely accepted data modelling approach 3 basic notions: entities attributes relationships

What is an entity? An entity is an object that can be identified in the users’ work environment and that users want to track.

Entities An entity is a thing or object in the real world (within the application context) An entity has a set of properties which uniquely identify it. An entity is represented as a rectangle in an ER diagram Project

What is an Attribute? An attribute describes a characteristic of an entity For example: An entity: Employee Has attributes: Employee_Name Extension Date_Of_Hire

Attributes Example: Project = (proj_name, location, budget, start_date, end_date) Represented as ellipses in an ER diagram budget start_date location Project end_date proj_name

What are Relationships? Relationships are associations between entities which express some real world relationship Project Employs Employee Project and Employee participate in the employs relationship The function that an entity plays in a relationship is called that entity’s role

Relationship Sets starts at There can be more than one relationship between entities. There can be recursive relationships that can indicate roles for clarity. A relationship can also have descriptive attributes. Road Town ends at manager Employee works for worker date Client orders Book

Degree of Relationships Refers to the number of entities participating in a relationship Most relationships are binary (degree 2), but can also have ternary (degree 3) relationships. Name proj_name Project Hires Contractor location Address budget end_date start_date end_date Contract number start_date value

Mapping Cardinalities Express the number of entities to which another entity can be associated via a relationship For a binary relationship, the mapping cardinality can be one of the following: one to one one to many many to one many to many

Cardinality Examples A person has only one ID book and an ID book belongs to only 1 person A person can own many cars (possibly 0), but a car only has 1 owner A person can own many houses and a house can have multiple owners Person ID Book owns Person Car owns Person House owns

Design Issues Entity or Attribute? Example: should location be an entity or an attribute? can a project be in more than 1 location? Entity or Relationship? generally: relationships for actions between entities whatever “makes sense” in application context

ER Diagram Symbols Entity Set One-to-one link Many-to-one link Attribute Many-to-many link Relationship

Example ERD Project Employee Alien employs eliminates start_date budget ID surname end_date first_name proj_name Project employs Employee location position year_joined start_date end_date eliminates year_left species Alien area

ER Design: Where to Start Identify entity sets Describe the entity sets with attributes Specify relationships and cardinalities

Simple Modelling Example Every department within the company is in only one division. Each division has more than one department in it. There is no upper limit on the number of departments that a division can have.

1. Define Entities Division Department Employee

2. Define Relationships Division contains Department manages Employee

3. Define Cardinality Division contains Department manages Employee

Standard Notation A plain rectangle is used to represent the entity type. INVOICE A labeled line to represent the relationship. is sent by 1 : 1 A B A B 1 : N

Diagram with Standard Notation Division contains Department manages Employee

Notation Examples ONE course has enrolled ONE or MORE students. ONE student is enrolled on ONE course. LOAN BOOK refers to ONE loan refers to ONE book. ONE book is referred to ONE loan.

Many-to-Many Relationship Example Any one supplier might supply more than one kind of part. Any one kind of part might be bought from a number of different suppliers. SUPPLIER PART supplies

More Examples is associated can place teach Customer Property Customer Order teach Teachers Students

Example - Simple Hospital System WARD DOCTOR has accommodates assigned treats NURSE PATIENT AILMENT cares for suffers from

College System DEPARTMENT COURSE LECTURER STUDENT is_in offers teaches enrols STUDENT

Your Project Work Develop Requirements Document. Think about your system’s entities and relationships