Complex entities and relationships Case examples are from the book: Lars Fank Databaser Teori og Praksis ISBN 87-571-2397-7.

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Complex entities and relationships Case examples are from the book: Lars Fank Databaser Teori og Praksis ISBN
Chapter Three Objectives Identification of Keys Application of primary and foreign keys Converting a database design to Relational DB. What is a good DBMS.
Need for Normalization
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Boyce-Codd Normal Form Kelvin Nishikawa SE157a-03 Fall 2006 Kelvin Nishikawa SE157a-03 Fall 2006.
1 NORMALISATION. 2 Introduction Overview Objectives Intro. to Subject Why we normalise 1, 2 & 3 NF Normalisation Process Example Summary.
Normalization I.
Normalization of Database Tables
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Lesson-19 Data Modeling and Analysis
Project and Data Management Software
July 14, 2015ICS 424: recap1 Relational Database Design: Recap of ICS 324.
NORMALIZATION N. HARIKA (CSC).
Lecture 12 Inst: Haya Sammaneh
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
CBAD2103 Data Analysis and Modeling. Chapter 7 Conceptual Design Methodology.
CTFS Workshop Shameema Esufali Suzanne Lao Data coordinators and technical resources for the network
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Chapter 13 Normalization Transparencies. 2 Last Class u Access Lab.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
1 Pertemuan 23 Normalisasi Matakuliah: >/ > Tahun: > Versi: >
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Database Design Using Entity-Relationship Models Transformation of Entity-Relationship Models into Relational Database Design Trees, Networks, and Bills.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
1 CS 3630 Database Design and Implementation. 2 Sets Foundation of relational database. Basic Operations Power set Mapping.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
System and data modeling tools Revision. Schemas A schema shows the organisational structure of a database. It should show the entities (the tables in.
Relational Theory and Design
Normalization of Database Tables
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
9/23/2012ISC329 Isabelle Bichindaritz1 Normalization.
Normalization MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
DATA NORMALIZATION CS 260 Database Systems. Overview  Introduction  Anomalies  Functional dependence  Normal forms  1NF  2NF  3NF  BCNF  Denormalization.
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
Lecture 3 Functional Dependency and Normal Forms Prof. Sin-Min Lee Department of Computer Science.
Chapter 5.1 and 5.2 Brian Cobarrubia Database Management Systems II January 31, 2008.
CTFS Workshop Shameema Esufali Asian data coordinator and technical resource for the network
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
The relational model1 The relational model Mathematical basis for relational databases.
Microsoft Access 2010 Chapter 11 Database Design.
Normalization. Overview Earliest  formalized database design technique and at one time was the starting point for logical database design. Today  is.
Normalization ACSC 425 Database Management Systems.
Logical Database Design and Relational Data Model Muhammad Nasir
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
Chapter 8 Relational Database Design Topic 1: Normalization Chuan Li 1 © Pearson Education Limited 1995, 2005.
Normalization.
A Guide to SQL, Eighth Edition
Databases – Exam questions
SEEM3430: Information Systems Analysis and Design
Conceptual and Physical Database Design
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Relational Database Design by Dr. S. Sridhar, Ph. D
Payroll Management System
Database Normalization
Elements of Database System
Normalization Referential Integrity
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Entity relationship diagrams
Chapter 6 Normalization of Database Tables
Normalization of DB relations examples Fall 2015
Sampath Jayarathna Cal Poly Pomona
Presentation transcript:

Complex entities and relationships Case examples are from the book: Lars Fank Databaser Teori og Praksis ISBN

The 7 most important slides in this course! Type of relationshipRelationship degree One-to-many relationshipBinary Many-to-many relationshipBinary One-to-one relationshipBinary Tree structure relationshipUnary Network relationshipUnary Order relationshipUnary Relationship of degree NN-ary

Repetition: One-to-many relationships

Repetition: Many-to-many relations.

In a tree structure relation, each node has at most one parent node.

The organization structure of companies is normally a tree structure.

In a production structure the relationship has data associated.

Different illustrations of tree structure relationships:

How would you implement the tree production structure with relatioship data in the relational model? How is it possible to find all the raw materials of a given product?

In a network relationship, a node may have any number of parents.

Different illustrations of network structure relationships:

Illustrate the contents of the Node and Branche tables for the first two levels of the production structure below.

The left diagram illustrates how to produce both logical and physical products. For example the “Input” relationship to the “Logical processes” should have an attribute that describes how much of the raw materials or semi-products that are normally used in the different processes of a production. The right diagram uses a network structure to illustrate the production process. Which implementation model of the production database do you prefer?

Exercise How would you implement a family tree that may be used to prevent inbreeding of animals.

Database of the ERP production module

Is the formal leadership of an organization a network or a tree structure? Is the informal leadership of an organization a network or a tree structure? Describe other examples of network or tree structures?

Phases in relational database design:

Entities are normally stored in tables together with their attributes. Primary key = Any unique identification attribute may be selected as the primary key. EmployeeIDNameCitySex S1PeterÅrhusMale S2JohnKøbenhavnMale S4MichaelOdenseMale S5ElisabethKøbenhavnFemale Forign key = an attribute that is a primary key in some other table. A relationship from one entity to another may be implemented by storing the primary key of the related entity as a forign key. CitySize Århus København1 mill. Odense

Key definitions: Candidate key =any minimal set of attributes that may be used as a primary key. Determinant key = Candidate key for some of the nonprime attributes. Nonprime attribute = Any attribute that is not part of a candidate key. EmployeeID Size BynavnCity Name S ÅrhusAarhus Pedersen S2 1 mill. KøbenhavnCopenhagen Olsen S Odense Hansen S5 1 mill. KøbenhavnCopenhagen Jensen

Boyce-Codd Normal Form (BCNF): BCNF = If a table has more determinant keys they may all be used as the primary key. The problem with the third normal form (3NF) is that it does not allow more than one candidate key in a table, and that is not acceptable. Determinant key = Candidate key for some of the nonprime attributes. Size BynavnCity ÅrhusAArhus Odense 1 mill. KøbenhavnCopenhagen

Is the employee table on Boyce-Codd Normal Form (BCNF)? Candidate key =any minimal set of attributes that may be used as a primary key. Determinant key = Candidate key for some of the nonprime attributes. Nonprime attribute = Any attribute that is not part of a candidate key. EmployeeID Size BynavnCity Name S ÅrhusAarhus Pedersen S2 1 mill. KøbenhavnCopenhagen Olsen S Odense Hansen S5 1 mill. KøbenhavnCopenhagen Jensen

End of session Thank you !!!