IS6125/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
Entity-Relationship Models
Advertisements

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,
CHAPTER 2. FUNDAMENTAL OF ENTITY RELATIONSHIP (ER)
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Unit 3: Entity-Relationship Modeling
Concepts and Terminology Introduction to Database.
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
Conceptual Design to Logical Design Lecture 4. Aims  To introduce Business Rules  To identify what a Business Rule is  To Introduce Business Operations.
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
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
IS6145 Database Analysis and Design Lecture 4: Fine-Granular Design-Specific ER Modelling Rob Gleasure
Week 03 – ER Diagram INFOSYS 222.
Data Modeling Using the ERD
Let try to identify the conectivity of these entity relationship
Database Development Lifecycle
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
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.
Entity-Relationship Model
Database Design – Lecture 4
Enhanced ER Modeling Transparencies
IS6125 Database Analysis and Design Examples for exam revision
IS6145 Database Analysis and Design Examples for exam revision
ER Modeling Case Studies
CIS 336 str Competitive Success/snaptutorial.com
CIS 336 str Education for Service- -snaptutorial.com.
CIS 336 STUDY Lessons in Excellence-- cis336study.com.
CIS 336 str Teaching Effectively-- snaptutorial.com.
Entity-Relationship Model and Diagrams (continued)
CS 174: Server-Side Web Programming February 12 Class Meeting
Data Modelling Introduction
Question 01 A company database needs to store information about employees (identified by NIC, with salary and phone as attributes), departments (identified.
IS6125 Database Analysis and Design Lecture 6: Fine-Granular Design-Specific ER Modelling Rob Gleasure
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
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
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
Review of Week 1 Database DBMS File systems vs. database systems
ER Modeling Case Studies
IS6145 Database Analysis and Design Lecture 12: Semester Review and Exam Preparation Rob Gleasure
ER Modeling Case Studies
CHAPTER 2 - Database Requirements and ER Modeling
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:

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

Course structure Or more specifically Week 1: Introduction Week 2: Foundational Concepts of Data Modelling Week 3: ER Modelling and Beyond the Presentation Layer Week 4: Fine-Granular Design-Specific ER Modelling Week 5: Enhanced Entity-Relationship (EER) Modelling Week 6: Practice with ERDs Week 7: In-Class Data Modelling Exam Week 8: The Data Value Map Week 9: Data Normalisation Week 10: NoSQL and Hadoop Week 11: Blockchain Week 12: Revision

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

CA/scheduling update October 24th In-class exam from 13.00-14.00 Session on Data Value Maps with Tadhg Nagle from 14.15-16.00 in WW6 (ground floor, West Wing of Quad) Report due 14th November Template structure now online

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

Example narrative: Mary’s Playschool

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

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 the structure of these)

Example narrative: Mary’s Playschool

Example narrative: Mary’s Playschool

Example narrative: Mary’s Playschool Semantic integrity constraints > Constraint Teacher.Experience IN (‘L’,’I’,’H’) > Constraint Teacher.Age NOT > 67, NOT < 18 > Constraint Teacher.Part-time IN (‘T’,’F’) > Constraint Child.Age NOT > 12, NOT < 2 > Constraint Room.Size NOT > 30, NOT < 1

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)

Example narrative: BigArt Galleries