Database Design Sections 4 & 5 Subtype, Supertype, Mutually exclusive, non-transferability, transferable, 1:1, 1:M, M:M, Redundant, Intersection entity,

Slides:



Advertisements
Similar presentations
Developing ER-Diagram
Advertisements

Data Modeling and the Entity-Relationship Model
Modeling the Data: Conceptual and Logical Data Modeling
Entity Relationship Diagrams
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
CSCI 242 Relational Data Modeling Copyright 2011, David C. Roberts, all rights reserved.
CSCI 6442 Entity-Relation Data Modeling Copyright 2012, David C. Roberts, all rights reserved.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Database Design Sections 4 & 5 Subtype, Supertype, Mutually exclusive, non-transferability, transferable, 1:1, 1:M, M:M, Redundant, Intersection entity,
MIS2502: Data Analytics Relational Data Modeling
Entity-Relationship Design
Oracle Academy -Week 1-.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 1.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Advanced Entity Relationship Concepts. Advanced Concepts UIDs Intersection Entities Recursive Relationships Roles Subtypes Exclusivity Historical Fan.
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition Copyright 2006 © John Wiley & Sons, Inc. All rights reserved..
Entity Relationship Diagrams
Business Process Modeling
Mapping from Data Model (ERD) to Relational Model Yong Choi School of Business CSUB.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Database Design Sections 6 & 7 Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies and Recursive relationships.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Mapping from Data Model (ERD) to Relational Model
Artificial, Composite and Secondary UIDs
Database Design Sections 9 & 10 Modeling Historical Data, conditional nontranferability, time-related constraints 1.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
IS 475/675 - Introduction to Database Design
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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)
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Database Design Sections 11 Database relationship, Integrity, keys, mapping conceptual model to logical/physical model Previous Section 12 – DDLesson11Fa12.ppt.
Description and exemplification of entity-relationship modelling.
Entity Relationship Modeling
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Relationship Transferability. 2 home back first prev next last What Will I Learn? In this lesson, you will learn to: –Understand the difference between.
Copyright Ó Oracle Corporation, All rights reserved. Assign Unique Identifiers A Unique Identifier (UID) is any combination of attributes and/or.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
MIS2502: Data Analytics Relational Data Modeling
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
1 Class Agenda (04/06/2006 and 04/11/2006)  Discuss use of Visio for ERDs  Learn concepts and ERD notation for data generalization  Introduce concepts.
Data modeling Process. Copyright © CIST 2 Definition What is data modeling? –Identify the real world data that must be stored on the database –Design.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Database Design Sections 8 & 12 Modeling Historical Data, conditional nontranferability, time-related constraints.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Logical Database Design and the Relational Model.
subtype 1.inherits all attributes of the supertype 2.inherits all relationships of the supertype 3. usually has its own attributes or.
Lecture 4: Logical Database Design and the Relational Model 1.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
1 Database Design Sections 6 & 7 First Normal Form (1NF), Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies.
DATA MODELING AND DATABASE DESIGN
Let try to identify the conectivity of these entity relationship
Logical Database Design and the Rational Model
Systems Analysis and Design
Chapter 4: Part B Logical Database Design and the Relational Model
DESIGNING DATABASE APPLICATIONS
Chapter 5: Logical Database Design and the Relational Model
Database Fundamentals
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
MIS2502: Data Analytics Relational Data Modeling 2
Database Management system
Entity Relationship (ER) Modeling
DATA MODELING AND DATABASE DESIGN
Presentation transcript:

Database Design Sections 4 & 5 Subtype, Supertype, Mutually exclusive, non-transferability, transferable, 1:1, 1:M, M:M, Redundant, Intersection entity, Barred relationship, First Normal Form (1NF)

DJs on Demand – Partial ERD

Reserved Words  A reserved work is one that has a specific meaning and function in the computer system, language, or database.  Examples: NULL DATE DISTINCT

Video Store – example  Identify business rules  Construct ERD  Class activity

Video Store Matrix ACTORCUSTO- MER MOVIETAPE ACTOR Featured in CUSTO- MER The renter of MOVIE The feature of On TAPE Rented byA copy of

Video ERD featured in TAPE number format MOVIE id title category ACTOR stage name real name CUSTOMER membership number last name first name phone number a copy of on the feature of rented by the renter of

Use Source Documents  Source document assist in identifying entities, attributes, and relationships

Global Fast Food  Identify entities

Possible solution ORDER #number *date *time STAFF #id *first name *last name *date of birth *salary FOOD ITEM #number *description *price handle handled by list listed on

Subtype & Supertype  Supertype (entity) can be subdivided into Subtypes  Example: JOB manager clerk sales support

Attributes  Supertype can have attributes at supertype level  Attributes at supertype level are for all subtypes  Subtypes can have own attributes for only that attribute

Example EXAM #number *description *weight *date *grade for written component MIDTERM * grade for oral presentation FINAL *extra pts for opt. paper QUIZ BONUS QUESTIONS STUDENT included in included taken by

Global Fast Food Employees  STAFF is an entity and supertype  What are the attributes of STAFF?  What subtypes exist in STAFF? Are there any attributes in any of the subtypes?

Example  AUTOMOBILE subtypes are not mutually exclusive  AUTOMOBILE possible solution  BUILDING subtypes have problem of not being exhaustive, should be minimum of 2 types

Business Rules  Recognize if Business rule is implemented by the data model or by programming  Example: Only an employee with a title of manager can manage other employees The event planner must contact the customer before the DJ can be assigned  Business rules can changed as society changes or business leaders feel change needed

Business rule types  Structural Must be entered at time of initial data entry  Example: When ORDER entered a staff id must be entered  Does not require code written to enforce  Procedural Work flow related Programmed validation is procedural constraint  Generally need to write code  Example: Commission can not be > 25% of salary

Each entity has  Name  Optionality  Cardinality  Transferability

Relationship transferability  Rules established for the purpose such as safety, efficiency, or increased profit  Example: Airline tickets can be transferable or non-transferable?  Non-transferable means also not updatable  symbol used to denote non- transferable blood type is non-transferable

Non-transferable relationship  Orders are non-transferable  Resolution would be to cancel order and create new order CUSTOMER ORDER place placed by

Example #1  Each town may be the birthplace of many people. Each person must be born in one and only one town. PEOPLE TOWN birthplace for born in

Relationship types  One to One (1:1)  One to Many (1:M)  Many to Many (M:M)

One to One relationship  Usually few of these relationships  Often mandatory at one side  If mandatory at both ends be aware, it might be a error. Possible should be only one entity not two PERSON BYCYCLE ride ridden by

One to Many  Most common type are mandatory on one side and optional on the other  Mandatory at both ends models entities that cannot exist without each other ORDER ORDER TYPE

One to Many example TAX RETURN TAX REPORT LINE BANDMUSICIAN composed of belong to composed of entered in

Many to Many  Often common in initial version of ERD  Later stage of design converted to other type STUDENT TEACHER learn from educate

Redundant relationship  Redundant relationship is one that can be derived from another relationship in the model

Many to Many Relationship Resolution  All M:M relationships must be changed to a set of 1:M and M:1 relationship  Insert a transition entity between  Occurs when you go from conceptual model to design model

Example: M:M with Intersection Entity STUDENT COURSE REGISTRATION

Resolving M:M with Intersection  Create an intersection entity  If you can’t find a good intersection entity create one by concatenate two entities together

Example PARTNER EVENT WORK ASSIGNMENT (PARTNER_EVENT)

Normalization  To make sure you don’t store the same data twice in the model  Also, that you store the data in the correct place  We will cover the first 3 normal forms.

First Normal Form (1NF)  First Normal Form requires that there be no multivalued attributes and no repeating groups.  To check for 1NF, validate that each attribute has a single value for each instance of the entity.  In other words: “One value per Attribute”.

Example 1NF  This has multiple values for the classroom. SCHOOL BUILDING #code *name *address *classroom

Example 1NF  Telephone is a multvalued attribute that could be an Entity. Ie. Home, work, mobile, fax etc.  Not all Employees have multiple phones, so there would eliminate multiple NULL values. EMPLOYEE #id *name *address. º telephone º salary

Review 1NF examples  Look at the 4 examples on 5.4.4