1 SA0951a Entity-Relationship Modelling. 2 What is it about? ER model is used to show the Conceptual schema of an organisation. Independent of specific.

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity Relationship (E-R) Modeling
Conceptual / semantic modelling
Database Design: ER Modelling (Continued)
Chapter 6: Entity-Relationship Model (part I)
the Entity-Relationship (ER) Model
Lecture plan Outline of DB design process 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.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
CSC271 Database Systems Lecture # 22. Summary: Previous Lecture  Applying Database SDLC on DreamHome  Database planning  System definition  Requirements.
Entity-Relation Modeling Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Lecture Eleven Entity-Relationship Modelling
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Entity-Relationship (E-R) Model
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Mapping ERM to relational database
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,
Data Modeling Using the Entity-Relationship Model
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
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.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Chapter 5 Entity–Relationship Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity Relationship Modeling
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
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 
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R Model.
Entity-Relationship Modeling
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
1 Entity-Relationship Model © Pearson Education Limited 1995, 2005.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Data Modeling and the Entity-Relationship Model CS 475 Lecture Notes.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
Conceptual Modelling The Entity-Relationship (ER) Model The ER diagram Data Modelling.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
ENTITY- RELATIONSHIP MODELLING 1 All rights reserved by
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Data Modeling Using the Entity- Relationship (ER) Model
Entity- Relationship (ER) Model
COP Introduction to Database Structures
Conceptual Design & ERD Modelling
Entity-Relationship Model
Entity Relationship Model
Entity-Relationship Model
Entity-Relationship Modelling
Entity-Relationship Modeling
Lecture3: Data Modeling Using the Entity-Relationship Model.
بسم الله الرحمن الرحيم.
Entity-Relationship Modeling
Chapter 4 Entity Relationship (ER) Modeling
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Entity-Relationship Modelling
Database Modeling using Entity Relationship Model (E-R Model)
Chapter 7: Entity-Relationship Model
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Presentation transcript:

1 SA0951a Entity-Relationship Modelling

2 What is it about? ER model is used to show the Conceptual schema of an organisation. Independent of specific data model or DBMS The model is later transformed into a Logical model (e.g. relational) on which the physical database is built The most widely used form of Semantic modelling: attempt to capitalise on knowledge of meaning of data to inform the model So we need a vocabulary

3 The Entity Relationship Model Perspective OrganisationInformation System Relational Model Physical data storage ERM Conceptual ModelLogical ModelPhysical Model This was lecture 1!

4 Skills and concepts So the concepts we want you to learn today are: – The basics of Entity-Relationship modelling – E ntities – R elationships – A ttributes

5 Entities Entity - distinguishable “thing” in the real world – Strong (or regular) entity - entities have an independent existence (e.g. staff) – Weak entity - existence dependent on some other entity (e.g. next of kin) space for attributes Entity type name (singular, no spaces, capital letter at start of each word)

6 Attributes Entity types have Attributes (or properties) which associate each entity with a value from a domain of values for that attribute Attributes can be – simple (atomic) e.g. Surname; date of birth – composite e.g. address (street, town, postcode) – multi-valued e.g. phone number – complex nested multi-valued and composite – base or derived e.g. D.O.B. ; age – key Relationship types can also have attributes! (see later)

7 Notation for attributes Primary Key marked {PK} Multi-Valued Attribute (number of values in [ ] brackets) Derived Attribute Composite attribute Partial Key - part of composite PK - or of a weak entity {PPK}

8 Relationships A relationship is “.. An association among entities (the participants)..” Relationships link entities with each other Name: verb, capital start letter, arrow indicates direction in which verb makes sense

9 Relationships: constraints The degree of a relationship type – binary (connects 2 entity types) – unary/ recursive (connects 1 entity type with itself) – complex (connects 3 or more entity types) Ternary (connects 3) Relationship constraints - cardinality – one to one (1:1) – one to many (1:m) – many to many (m:n) Relationship constraints – participation – full/mandatory – or partial/optional Degree Multiplicity

10 Relationships: Degree Binary relationship Complex relationship – here ternary Recursive (Unary) relationship - example

11 Relationships: Multiplicity label lines to show cardinality and participation 0..1“zero or one” 0..*“zero or more” 1..1“one” 1..4“between 1 and 4” 1..*“one or more” optional mandatory * Entity1 has a 1:m relationship with Entity2; participation for Entity2 is mandatory, for Entity1 optional.

12 Relationships example ManagerDepartment Manages responsibility [1..*] dateAllocated Each department is managed by ONE manager Each manager manages UP TO 3 departments (but need not manage any department) Relationshi p attributes

13 Over to You now! See if you can draw an E-R diagram for this scenario – you are already familiar with this! – “A student registers for up to 8 modules and each module has many students on it. Record the student ID, their full name and address and also each module ID and title. We also want to hold the grade attained by each student for each module” Remember to show in your model: – All primary keys, – Entities – Relationships – Attributes

14 Unary Example with Data Staff supervises 0..* 0..1  A member of staff may supervise another staff member, but a staff member may be supervised by one or more staff members STAFF MemberAgeSupervisor Grey43Black Black27 Brown35Black White33Brown

15 Ternary Diagrams are Tricky! Scenario modified from Connolly & Begg page 350 registers * Try to determine participation/cardinality by operating in pairs “a client at a branch will be registered by one member of staff” “a member of staff will register a client at one branch” “a member of staff at a branch may register many clients” StaffBranch Client

16 Key Points ERM – Entities (strong, weak) – Attributes (simple, composite, etc) – Relationships Degree Cardinality participation Model with the UML notation at conceptual level

17 Directed Reading Connolly/Begg “Database Systems” (4 th ed.) – Chapter 11 Connolly/Begg “Database Solutions” – Chapter 7 – Rob et al (chapter 5 but the notation is slightly different ***************************************************************** Note that if you read any other database textbook or access any websites you will see other forms of notation used in E-R modelling. Whilst it is fine to broaden your awareness we shall be using the notation of Connolly and Begg. *****************************************************************