Step 1: Create and Check ER Model

Similar documents
Step 2: Map ER Model to Tables

ER Model. Objectives (2/2) Electricite Du Laos (EDL) Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1

Conceptual Database Design

Database Normalization

Step 4: Choose file organizations and indexes

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Elements of the E-R Model

COMP102: Introduction to Databases, 4

COMP102: Introduction to Databases, 5 & 6

Introduction to Database Design. Dr. Kanda Runapongsa Dept of Computer Engineering Khon Kaen University

COMP102: Introduction to Databases, 14

SOLUTIONS TO REVIEW QUESTIONS AND EXERCISES FOR PART 3 - DATABASE ANALYSIS AND DESIGN (CHAPTERS 10 15)

Entity Relationship Modeling

Well-formed XML Documents

Programming in the Small II: Control

Physical Database Design

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

Chapter 12. Entity-Relationship Modeling

LECTURE 3: ENTITY-RELATIONSHIP MODELING

3ISY402 DATABASE SYSTEMS

COMP102: Introduction to Databases, 9.1

Chapter 17. Methodology Logical Database Design for the Relational Model

Data Analysis 2. Chapter 2.2 V3.0. Napier University Dr Gordon Russell

Entity-Relationship Models 2. Connolly/Begg Chapter 11

Introduction to Java

Transforming ER to Relational Schema

LELCTURE 4: ENHANCED ENTITY-RELATIONSHIP MODELING (EER)

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling

Objective. The goal is to review material covered in Chapters 1-5. Do the following questions from the book.

Conceptual and Logical Design

COMP102: Introduction to Databases, 1 & 2

4. Entity Relationship Model

Correctness and Robustness

COMP102: Introduction to Databases, 13

Lecture 09. Spring 2018 Borough of Manhattan Community College

6.1 RELATIONSHIP CONCEPTS

Logical Database Design. ICT285 Databases: Topic 06

XML Parsers. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University

Lecture 03. Fall 2017 Borough of Manhattan Community College

DB Creation with SQL DDL

Programming in the Large II: Objects and Classes (Part 2)

Lecture 03. Spring 2018 Borough of Manhattan Community College

Chapter 6. SQL: SubQueries

OBJECTIVES. How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization.

Lecture4: Guidelines for good relational design Mapping ERD to Relation. Ref. Chapter3

LECTURE 6: GUIDELINES FOR GOOD RELATIONAL DESIGN MAPPING ERD TO RELATIONS

King Fahd University of Petroleum and Minerals

Information Systems Engineering. Entity Relationship Model

Information Systems Engineering

Example 1 - Create Horizontal View. Example 2 - Create Vertical View. Views. Views

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

Lecture3: Data Modeling Using the Entity-Relationship Model.

RELATIONAL DATA MODEL

Relational Model. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

Introduction to REST Web Services

CS317 File and Database Systems

Advanced Computer Programming

CS317 File and Database Systems

STRUCTURED QUERY LANGUAGE (SQL)

Beginning Database. Design. From Novice to Professional. Clare Churcher. Apress-

XPath. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University

Progress Report. Object-Oriented Software Development: Requirements elicitation (ch. 4) and analysis (ch. 5) Object-oriented software development

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

ADVANCED QUERY AND VIEWS

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.


Chapter 2 Conceptual Modeling. Objectives

Lecture Notes. Structured Systems Analysis

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

JAX-WS 3/14/12 JAX-WS

Advanced Computer Programming

Introduction to XML 3/14/12. Introduction to XML

Lecture 10. Spring 2018 Borough of Manhattan Community College

Chapter 14. Chapter 14 - Objectives. Purpose of Normalization. Purpose of Normalization

Conceptual Database Design (ER modeling) Chapter Three

Database Management System 5 ER Modeling

IS 263 Database Concepts

Chapter 6. Advanced Data Modeling. Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

ER to Relational Mapping

Lecture5 Functional Dependencies and Normalization for Relational Databases

Chapter 2: Entity-Relationship Model

Data Modeling with the Entity Relationship Model. CS157A Chris Pollett Sept. 7, 2005.

Entity Relationship Diagram (ERD) Dr. Moustafa Elazhary

Design Engineering. Dr. Marouane Kessentini Department of Computer Science

(C) 2010 Pearson Education, Inc. All rights reserved. Dr. Marenglen Biba

E-R Model. Hi! Here in this lecture we are going to discuss about the E-R Model.

CMP-3440 Database Systems

Institute of Southern Punjab, Multan

Chapter 6. SQL Data Manipulation

Lecture 6 Structured Query Language (SQL)

G.C.E. (A/L) Examination June 2015 Conducted by Field Work Center, Thondaimanaru.

GUI Event Handlers (Part I)

Chapter 2: Entity-Relationship Model. Entity Sets. Entity Sets customer and loan. Attributes. Relationship Sets. A database can be modeled as:

Object-Oriented Software Engineering Practical Software Development using UML and Java

Chapter 3. The Relational database design

CMP-3440 Database Systems

Process Modeling. Wei-Tsong Wang 1 IIM, NCKU

CS317 File and Database Systems

Lecture 5 Data Definition Language (DDL)

Normalisation. Normalisation. Normalisation

Transcription:

Step 1: Create and Check ER Model Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept of Computer Engineering Khon Kaen University Overview The tasks in Step 1 of the database design methodology, which build an ER model. The documentation produced during Step 1 of database design, including Entity Relationship (ER) diagrams and a data dictionary. 2 Step 1 Create and Check ER Model Objective is to build an ER model of the data requirements of an organization (or part of an organization) to be supported by a database 3 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1

Step 1 Tasks (1/2) Step 1.1 Identify entities Step 1.2 Identify relationships Step 1.3 Identify and associate attributes with entities or relationships Step 1.4 Determine attribute domains Step 1.5 Determine candidate, primary, and alternate key attributes 4 Step 1 Tasks (2/2) Step 1.6 Specialize/Generalize entities (optional step) Step 1.7 Check model for redundancy Step 1.8 Check model supports user transactions Step 1.9 Check model with users 5 Step 1.1 Identify entities One method is to examine the users requirements specification for nouns or noun phases Look for major objects such as people, places, or concepts of interest Excluding those nouns that are merely qualities of other objects Document entities 6 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 2

StayHome entities Branch Video Member Actor Staff VideoForRent RentalAgreement Director 7 Extract from data dictionary for StayHome 8 Step 1.2 Identify relationships One method is to examine users requirements specification for verbs or verbal expressions Use entity relationship (ER) modeling Determine the multiplicity constraints of relationships Check for fan and chasm traps Document relationships 9 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 3

First ER diagram of StayHome 10 First draft of relationships for StayHome 11 Multiplicity constraints for relationships 12 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 4

Adding multiplicity constraints to ER diagram 13 Extract from the data dictionary showing descriptions of relationships 14 Step 1.3 Identify and associate attributes with entities or relationships Attributes can be identified where noun or noun phrase is a property, quality, identifier, or characteristic of one of the entities or relationships previously found. Document attributes 15 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 5

Documenting attributes (1/2) Attribute name and description Data type and length Any aliases that the attribute is known by Whether the attribute must always be specified (in other words, whether the attribute allows or disallows nulls) 16 Documenting attributes (2/2) Whether the attribute is multi-valued; Whether the attribute is composite, and if so, which simple attributes make up the composite attribute; Whether the attribute is derived and, if so, how it should be computed; Default values for the attribute (if specified) 17 Associate attributes with entities Branch (branchno, address(composite street, city state, zipcode), telno (multi-valued)) Staff (staffno, name, position, salary) Video (catalogno, title, category, dailyrental, price) Director (directorname) Actor (actorname) Member (memberno, name (composite: fname, lname), address) RentalAgreement (rentalno, dateout, datereturn) VideoForRent (videono, available) 18 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 6

Extraction of data dictionary showing descriptions of attributes 19 Step 1.4 Determine attribute domains A domain is a pool of values from which one or more attributes draw their values A domain specifies: allowable set of values for the attribute; size and format of the attribute. Document attribute domains 20 Step 1.5 Determine candidate, primary, and alternate key attributes Identify candidate key(s) for an entity and then selecting one to be the primary key Candidate keys can never be null Remaining candidate keys are called alternate keys Document candidate, primary and alternate keys 21 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 7

Guidelines for choosing a primary key (1/2) Select the candidate key The minimal set of attributes That is less likely to have its values changed That is less likely to lose uniqueness in the future 22 Guidelines for choosing a primary key (2/2) Select the candidate key With fewest characters (for those with textual attribute(s)) With the smallest maximum value 9for numerical attributes) That is easiest to use from the users point of view 23 ER diagram showing primary keys 24 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 8

Extract from data dictionary showing attributes with primary and alternate keys 25 Step 1.6 Specialize/Generalize entities (optional step) Objective is to identify superclass and subclass entities, where appropriate The modeling of superclasses and subclasses adds more information to the data model, but also adds more complexity as well 26 Step 1.7 Check model for redundancy Examine the ER model and if redundancy found, remove from model The three activities in this step are (1) re-examine one-to-one (1:1) relationships (2) remove redundant relationships (3) consider the time dimension when accessing redundancy 27 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 9

Remove redundant relationships 28 Non-redundant relationships 29 Step 1.8 Check model supports user transactions ER model represents the data requirements of the organization Objective is to check that ER model supports the required transactions. Two possible approaches: (1) Describing the transaction (2) Using transaction pathways 30 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 10

Using pathways to check ER model supports user transactions 31 Step 1.9 Check model with users Objective is to review the ER model with the user to ensure that the model is a true representation of the data requirements of the organization (or the part of the organization) to be supported by the database 32 Summary Step 1: Create and Check ER Model Identify entities, relationships, attributes Identify primary and alternate key attributes Specialize/Generalize entities (optional step) Check model for redundancy Check model supports user transactions Check model with users 33 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 11

References Connolly and Begg, Database Systems: A Practical Approach to Design, Implementation and Management, Pearson, 2004 34 Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 12