DATA MODELLING AND ENTITY-RELATIONSHIP DIAGRAM

Similar documents
THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E)

Database Design Process

Chapter 3. Data Modeling Using the Entity-Relationship (ER) Model

Database Design Process

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

Entity-Relationship Model

Database Management Systems

Lecture 12: Entity Relationship Modelling

Entity - Relationship Modelling

Unit 2.1. Data Analysis 1 - V Data Analysis 1. Dr Gordon Russell, Napier University

CSC 742 Database Management Systems

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

The Entity-Relationship Model

A brief overview of developing a conceptual data model as the first step in creating a relational database.

Chapter 2: Entity-Relationship Model. E-R R Diagrams

Foundations of Information Management

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

XV. The Entity-Relationship Model

Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant

Data Analysis 1. SET08104 Database Systems. Napier University

Database Design Methodology

RELATIONSHIP STRENGTH

2. Conceptual Modeling using the Entity-Relationship Model

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps.

Lesson 8: Introduction to Databases E-R Data Modeling

Relational Database Concepts

Modern Systems Analysis and Design

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

7.1 The Information system

Conceptual Design: Entity Relationship Models. Objectives. Overview

Data Modeling: Part 1. Entity Relationship (ER) Model

An analysis of structural validity in entity-relationship modeling

Chapter 2: Entity-Relationship Model

Foundations of Information Management

Data Modeling. Database Systems: The Complete Book Ch ,

The E-R èentity-relationshipè data model views the real world as a set of basic objects èentitiesè and

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

Database Systems. Session 3 Main Theme. Enterprise Data Modeling Using The Entity/Relationship (ER) Model. Dr. Jean-Claude Franchitti

ER modelling, Weak Entities, Class Hierarchies, Aggregation

Designing a Database Schema

Converting E-R Diagrams to Relational Model. Winter Lecture 17

SCHEMAS AND STATE OF THE DATABASE

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded

Data Modeling Basics

The Entity-Relationship Model

Entity Relationship Diagram

Fundamentals of Database Design

IV. The (Extended) Entity-Relationship Model

Introduction to Computing. Lectured by: Dr. Pham Tran Vu

Conceptual Design Using the Entity-Relationship (ER) Model

Lecture Notes INFORMATION RESOURCES

A Short Tutorial on Using Visio 2010 for Entity-Relationship Diagrams

Chapter 2. Data Model. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

How To Write A Diagram

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Using Entity-Relationship Diagrams To Count Data Functions Ian Brown, CFPS Booz Allen Hamilton 8283 Greensboro Dr. McLean, VA USA

Review: Participation Constraints

AVOIDANCE OF CYCLICAL REFERENCE OF FOREIGN KEYS IN DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL

Requirement Analysis & Conceptual Database Design. Problem analysis Entity Relationship notation Integrity constraints Generalization

Database Design. Adrienne Watt. Port Moody

The Entity-Relationship Model

Concepts of Database Management Seventh Edition. Chapter 6 Database Design 2: Design Method

ComponentNo. C_Description UnitOfMeasure. C_Quantity

AS LEVEL Computer Application Databases

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:-

BİL 354 Veritabanı Sistemleri. Entity-Relationship Model

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

Uses Crows feet notation for ER Diagrams in ERwin


Relational Schema Design

A Comparative Analysis of Entity-Relationship Diagrams 1

Databases and BigData

Why & How: Business Data Modelling. It should be a requirement of the job that business analysts document process AND data requirements

Entity/Relationship Modelling. Database Systems Lecture 4 Natasha Alechina

1 Class Diagrams and Entity Relationship Diagrams (ERD)

Data Modelling and E-R Diagrams

Animated Courseware Support for Teaching Database Design

NATIONAL OPEN UNIVERSITY OF NIGERIA SCHOOL OF SCIENCE AND TECHNOLOGY COURSE CODE: CIT 743 COURSE TITLE: INTRODUCTION TO DATABASE MANAGEMENT SYSTEM

Database Fundamentals: 1

NATIONAL OPEN UNIVERSITY OF NIGERIA

Preview DESIGNING DATABASES WITH VISIO PROFESSIONAL: A TUTORIAL

Designing Databases. Introduction

12 File and Database Concepts 13 File and Database Concepts A many-to-many relationship means that one record in a particular record type can be relat

Database Modelling in UML

Database Design Methodologies

Chapter 8 The Enhanced Entity- Relationship (EER) Model

Part 7: Object Oriented Databases

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

Study Notes for DB Design and Management Exam 1 (Chapters 1-2-3) record A collection of related (logically connected) fields.

Lecture 6. SQL, Logical DB Design

CHAPTER 6 DATABASE MANAGEMENT SYSTEMS. Learning Objectives

DATABASE MANAGEMENT SYSTEMS. Question Bank:

IT2304: Database Systems 1 (DBS 1)

The Semantics of Reifying N-ary Relationships as Classes

Transcription:

DATA MODELLING AND ENTITY-RELATIONSHIP DIAGRAM EGCO321 DATABASE SYSTEMS KANAT POOLSAWASD DEPARTMENT OF COMPUTER ENGINEERING MAHIDOL UNIVERSITY

DATABASE MODEL Collection of logical constructs used to represent data structure and relationships within the database Conceptual models: logical nature of data representation Implementation models: emphasis on how the data are represented in the database

ENTITIES AND ATTRIBUTES (1) The basic object that the ER Model represents is an entity, which is a thing in the real world with an independent existence. Each entity has attributes the particular properties that describe it.

ENTITIES AND ATTRIBUTES (2) Example: Two entities, employee e 1 and company c 1, and their attributes.

ENTITIES AND ATTRIBUTES (3) Composite and Simple (Atomic) Attributes.

ENTITY TYPES AND ENTITY SETS (1) A database usually contains groups of entities that are similar. For example, a company employing hundreds of employees may want to store similar information concerning each of the employees. These employee entities share the same attributes, but each entity has its own value(s) for each attribute. An entity type defines a collection (or set) of entities that have the same attributes. The entity set is usually referred to using the same name as the entity type.

ENTITY TYPES AND ENTITY SETS (2) Two entity types, employee and company.

ENTITY TYPES AND ENTITY SETS (3) Value Sets (Domains) of Attributes. Each simple attribute of an entity type is associated with a value set (or domain of values) In previous figure (previous page), if the range of ages allowed for employees is between 16 to 70, we can specify the value set of the Age attribute of EMPLOYEE to be the set of integer number between 16 to 70. Value sets are typically specified using the basic data types available in most programming languages, such as integer, string, or boolean.

CONCEPTUAL DESIGN (1) Design of the COMPANY database

CONCEPTUAL DESIGN (2) Relationship Types and Relationship Sets. Some instances in the WORKS_FOR relationship sets, which represents a relationship type WORKS_FOR between EMPLOYEE and DEPARTMENT

CONCEPTUAL DESIGN (3) Relationship Degree, Role Names, and Recursive Relationships Some relationship instances in the SUPPLY ternary relationship set.

CONCEPTUAL DESIGN (4) Constrains on Relationship Types Relationship types usually have certain constraints that limit the possible combinations of entities that may participate in the corresponding relationship set. We can distinguish two main types of relationship constraints: Cardinality Ratio Participation

CONCEPTUAL DESIGN (5) Cardinality Ratio for Binary Relationships One-to-one (1:1) One-to-many (1:M) Many-to-many (M:N)

CONCEPTUAL DESIGN (6) A 1:1 relationship, MANAGES A M:N relationship, WORKS_ON

CONCEPTUAL DESIGN (7) Participation Constraints (Connectivity) specifies whether the existence of an entity depends on its being related to another entity via the relationship type. This constraint specifies the minimum number of relationship instances that each entity can participate in, sometime called the minimum cardinality constraint.

CONCEPTUAL DESIGN (8) Attributes of Relationship Types Relationship types can also have attributes, similar to those of entity types. For 1:1 or 1:N relationship types can be migrated to one of the participating entity types. For M:N relationship types, some attributes may be determined by the combination of participating entities in a relationship instance, not by any single entity. Such attributes must be specified as relationship attributes.

WEAK ENTITY TYPES Entity types that do not have key attributes of their own are called weak entity. In contrast, regular entity types that do have a key attribute are called strong entity type. We call the relationship type that relates a weak entity type to its owner the identifying relationship (or strong relationship) of the weak entity.

ENTITY-RELATIONSHIP DIAGRAM

ATTRIBUTES

ERD WITH CARDINALITY

OPTIONAL RELATIONSHIP

EXAMPLE

RELATIONSHIP STRENGTH (1) Existence Dependence Child entity existence dependent on existence of related parent entity. Existence-independent entities can exist apart from related entities. Weak (Non-Identifying) Relationship Entity is existence-independent of other entities. Strong (Identifying) Relationship Child entity is existence-dependent on parent.

RELATIONSHIP STRENGTH (2)

STRONG RELATIONSHIP AND WEAK ENTITY An entity type that borrows all or part of its primary key from another entity type. Identifying relationships indicate the entity types that supply components of the borrowed primary key.

WEAK ENTITIES (1)

WEAK ENTITIES (2)

SELF REFERENCING (UNARY)

M-WAY (TERNARY) RELATIONSHIP

RELATIONSHIP EQUIVALENCE A M-N relationship can be replaced by an associative entity type and two identifying 1-M relationships. In most cases the choice between a M-N relationship and the associative entity type is personal preference.

M-N RELATIONSHIP TRANSFORMED INTO 1-M RELATIONSHIP

GENERALISATION HIERARCHY

DISJOINTNESS AND COMPLETENESS

SUMMARY OF CROW S FOOT NOTATION

SUMMARY OF CHEN NOTATION

HOMEWORK 1 Draw an entity-relationship diagram and list all attributes including the primary key for each entity type, for a database suitable for showing the family tree. (fatherhood, motherhood, brotherhood, sisterhood, cousins, nephews, nieces, and grandparents) Remember that it is possible to reproduce without marriage and that marriage does not imply reproduction.