IS6145 Database Analysis and Design Lecture 4: Fine-Granular Design-Specific ER Modelling Rob Gleasure R.Gleasure@ucc.ie www.robgleasure.com.

Slides:



Advertisements
Similar presentations
Exercise 1 Consider the ER diagram below. Assume that an employee may work in up to two departments or may not be assigned to any department. Assume that.
Advertisements

Entity-Relationship Models
COP5725 – Principles of Database Management Systems
Entity-Relationship Model and Diagrams (continued)
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,
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
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.
IS6125 Database Analysis and Design Lecture 4: Conceptual Data Modelling 2: ER Modelling and Beyond the Presentation Layer Rob Gleasure
IS6125 Database Analysis and Design Lecture 3: Conceptual Data Modelling 1: The Foundational Concepts Rob Gleasure
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
IS6145 Database Analysis and Design Lecture 4: Fine-Granular Design-Specific ER Modelling Rob Gleasure
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
Mr C Johnston ICT Teacher
COP-5725 Practice Exercises
DBMS ER model-2 Week 6-7.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
G057 - Lecture 05 From Scenario To Design Mr C Johnston ICT Teacher
Week 03 – ER Diagram INFOSYS 222.
Data Modeling Using the ERD
Let try to identify the conectivity of these entity relationship
IS6145 Database Analysis and Design Lecture 7: Logical Modelling
Assignements.
Rob Gleasure IS3320 Developing and Using Management Information Systems Lecture 15: Data-Flow Diagrams 2 – Level.
IS6125 Database Analysis and Design Lecture 7: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
Databases Chapter 9 Asfia Rahman.
Entity-Relationship Model
IS6125 Database Analysis and Design Lecture 5: Conceptual Data Modelling 2: ER Modelling and Beyond the Presentation Layer Rob Gleasure
IS6125 Database Analysis and Design Lecture 4: Conceptual Data Modelling 1: The Foundational Concepts Rob Gleasure
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
DESIGNING DATABASE APPLICATIONS
Entity-Relationship Model
Database Design – Lecture 4
Entity-Relationship Modelling
IS6125 Database Analysis and Design Examples for exam revision
IS6145 Database Analysis and Design Examples for exam revision
ER Modeling Case Studies
CIS 336 STUDY Lessons in Excellence-- cis336study.com.
Entity-Relationship Model and Diagrams (continued)
Data Modelling Introduction
Entity Relationship Diagrams
Question 01 A company database needs to store information about employees (identified by NIC, with salary and phone as attributes), departments (identified.
IS6125/IS6145 Database Analysis and Design Lecture 4: Fine-Granular Design-Specific ER Modelling Rob Gleasure
IS6125 Database Analysis and Design Lecture 6: Fine-Granular Design-Specific ER Modelling Rob Gleasure
Chapter 4 Entity Relationship (ER) Modeling
IS6125/IS6145 Database Analysis and Design Lecture 2: Conceptual Data Modelling 1: The Foundational Concepts Rob Gleasure
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
Entity – Relationship Model
Rob Gleasure IS6125 Database Analysis and Design Lecture 11: Normalization of Data Tables Rob Gleasure
Entity-Relationship Modelling
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Data Modeling for Database Design 2
IS6145 Database Analysis and Design Lecture 3: Conceptual Data Modelling 2: ER Modelling and Beyond the Presentation Layer Rob Gleasure
Database Modeling using Entity Relationship Model (E-R Model)
IS6125 Database Analysis and Design Lecture 7: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
ER Modeling Case Studies
ER Modeling Case Studies
Entity Relation Model Tingting Zhang.
Database Management system
Database Management system
IS6125 Database Analysis and Design Lecture 8: Practice with ERDs
IS6145 Database Analysis and Design Lecture 6: Practice with ERDs
Information system analysis and design
Presentation transcript:

IS6145 Database Analysis and Design Lecture 4: Fine-Granular Design-Specific ER Modelling Rob Gleasure R.Gleasure@ucc.ie www.robgleasure.com

IS6145 Today’s session The Fine-Granular Design-Specific ER Model Some exercises

The Fine-Granular Design-Specific ER Model The development of the coarse-granular design-specific ER model from the Presentation Layer ER model allows greater detail in data modelling. However it may still contain constructs that may not be mapped directly to the database

The Fine-Granular Design-Specific ER Model This involves the following tasks The ER constructs that are not compatible for logical model mapping are decomposed, namely Multi-valued attributes m:n cardinality constraints Additional attribute characteristics are mapped to the ER diagram

Resolving Multi-Valued Attributes This can be done in two ways Including the attribute as part of the unique identifier for the entity Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

Resolving Multi-Valued Attributes Which looks as follows in terms of actual database tables Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

Resolving Multi-Valued Attributes Transform the multi-valued attribute into a new weak entity type (this is usually a last resort) Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

Resolving Multi-Valued Attributes Which looks as follows in terms of actual database tables Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

Resolving m:n Cardinality Constraints This requires the addition of a weak entity type with two identifying parents, sometimes called a ‘Gerund’ entity type, more often referred to as an associative entity E.g. imagine we added the following relationship to our ERD for Mary’s Playschool Has favourite Teacher Assistant (1, m) (1, n)

Resolving m:n Cardinality Constraints This could be replaced by Teacher Assistant (1, m) (1, m) Favours Favours Favoured pairing (1, 1) (1,1)

Adding Additional Data Characteristics to the ERD Next we want to include the data type and size into the ERD directly. We do this using a two-part notation. The first part uses the following letters to indicate type A – Alphabetic N – Numeric X – Alphanumeric Dt - Date The second part indicates size with a n1.n2 notation n1 indicates the number of characters before a decimal point n2 (optional) indicates the number of places after

Adding Additional Data Characteristics to the ERD For example Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

Semantic Integrity Constraints The remaining constraints at this level typically specify a range using the keyword ‘IN’ or ‘NOT’ e.g. > Constraint Experience IN (‘1’,’2’,’3’) > Constraint Teacher.Age NOT > 67 Or more complex interdependencies between entities using ‘related_how’ e.g. >Constraint related_how IN (‘Experience’,’1’,’2’) NOT (‘Capacity’>’20’)

Example narrative: Mary’s Playschool A parent registers their child or children at the school with a special registration form, which records the parent, the child, a contact phone number, and any special needs, allergies, etc. the child has. A parent submits one registration form for each child but they may have more than one child at the school. Each room in the school is assigned an age group. Children under 4 years of age go in different rooms from children over 4. A child is assigned to a room based on their age and the capacity of the room. This capacity depends on the room’s size and the experience of the teacher (which may be low, intermediate, or high) but total room capacity capped at 30. A room may be assigned one or more teachers but a teacher must only be assigned to one room. The school also employs assistants to help the teachers (they tend to have favourites they pair up with repeatedly), who must also be assigned to exactly one room. At all times, each room must have an assistant and/or a teacher associated with it. Some part-time teachers also act as assistants on free days.

Example narrative: Mary’s Playschool Draw a Fine-granular design-specific ERD Jot down any semantic integrity constraints you can think of (don’t worry too much about these though)

Example narrative: BigArt Galleries Galleries keep information about artists, their name (which is unique), birthplace, age, and one or more styles of art. For each piece of artwork, the artist, the year it was made, its unique title, its type of art (e.g., painting, lithograph, sculpture, photograph), and its price must be stored. Pieces of artwork are also classified into groups of various kinds, for example, portraits, still lifes, etc., and assigned a curator. A given piece may belong to more than one group. Each group is identified by a name (like those just given) that describes the group. Finally, galleries keep information about customers. For each customer, galleries keep that person’s unique name, address, total amount of dollars spent in the gallery (very important!), and the artists and groups of art that the customer tends to like.

Example narrative: BigArt Galleries Draw a Fine-granular design-specific ERD Jot down any semantic integrity constraints you can think of (again, don’t worry too much about these)