Chapter 2. The Relational Model (cont.) IST2101. Review: Functional Dependency A relationship between attributes: some attribute(s) determine the value.

Slides:



Advertisements
Similar presentations
The Relational Model DB Chapter 2 (and some from chapter 4, 5) J.G. Zheng June 27 th 2005.
Advertisements

Normalization Process: Exercise 2: Step 1 IST2101 Step 1. Identify all the candidate keys of the relation. (Attorney, ClientNumber, MeetingDate)
Lab Exercise This Week PHP Basics See last Friday’s slides for requirements Make sure you show the final results to TA to get credit 1IST210.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
The Relational Model Chapter Two Functional Dependency.
Fundamentals, Design, and Implementation, 9/e Chapter 4 The Relational Model and Normalization.
The Database Approach u Emphasizes the integration of data across the organization.
© 2005 by Prentice Hall Chapter 3a Database Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Relational Model Stores data as tables –Each column contains values about the same attribute –Each column has a distinct name –Each row contains values.
The Relational Model Chapter Two (Excerpts) DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
CSEN 5314 Quiz 3.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
N. J. Taylor Database Management Systems (DBMS) 1.
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Database Management System Lecture 6 The Relational Database Model – Keys, Integrity Rules.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Concepts and Terminology Introduction to Database.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Concepts of Database Management, Fifth Edition
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, Modified by Dr. Mathis 3-1 David M. Kroenke’s Chapter Three: The Relational.
CORE 2: Information systems and Databases NORMALISING DATABASES.
IST 210: ORGANIZATION OF DATA Chapter 1. Getting Started IST210 1.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
The Relational Model Chapter Two DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
Normalization Process: Exercise 1: Step 1 IST2101 Step 1. Identify all the candidate keys of the relation. StudentNumber.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Database Design IST210 Class Lecture
Chapter 2. The Relational Model IST2101. Chapter 1 Review Potential problems with Lists – Deletion – Update – Insertion Avoid these problems using a relational.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
Chapter 10 Normalization Pearson Education © 2009.
IST 318 – DB Administration
Chapter 2. The Relational Model (cont.)
THE RELATIONAL MODEL II IST 210: Organization of Data IST210 1.
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.
Relational Model & Normalization Relational terminology Anomalies and the need for normalization Normal forms Relation synthesis De-normalization.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Chapter 2. The Relational Model (cont.) IST2101. Review: Determinant vs. Candidate Key IST2102 DeterminantsCandidate Key (StudentID, CourseID) StudentID.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Assignment 1 Uploaded to course website Due next Tuesday, Sep 1, at 11:59pm.
THE RELATIONAL MODEL I IST 210: Organization of Data IST210 1.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Lecture 4: Logical Database Design and the Relational Model 1.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
MIDTERM REVIEW IST 210 Organization of Data IST210 1.
Chapter 1. Getting Started IST 210: Organization of Data IST2101.
CSIS 115 Database Design and Applications for Business
Chapter 4 Logical Database Design and the Relational Model
CSIS 115 Database Design and Applications for Business
CSIS 115 Database Design and Applications for Business
The Relational Model and Database Normalization
The Relational Model Chapter Two DATABASE CONCEPTS, 3rd Edition
Database Management Systems (DBMS)
Normalization Referential Integrity
Databases and Information Management
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
Design tools and techniques for a relational database system
Chapter 4 The Relational Model and Normalization
Chapter 3 The Relational Model
Presentation transcript:

Chapter 2. The Relational Model (cont.) IST2101

Review: Functional Dependency A relationship between attributes: some attribute(s) determine the value of some other attribute(s) in the same table –These attributes we name them determinant –The other attributes are functionally dependent on this determinant IST2102 CookieCost = NumberOfBoxes * $5 NumberOfBoxes  CookieCost CookieCost = NumberOfBoxes * UnitPrice (UnitPrice, NumberOfBoxes)  CookieCost determinant The composite forms determinant Functionally dependent on NumberofBoxes

Determinant = Candidate Key? IST2103 DeterminantsCandidate Key (StudentID, CourseID) StudentID CourseID (StudentID, CourseID) In a relation, a candidate key must be a determinant In a relation, a determinant may not be a candidate key A relation is well-formed if and only if every determinant is a candidate key.

Normalization Normalization is a process of breaking a table with more than one theme into a set of tables to ensure that each table is well-formed – No data redundancy – Data can be inserted, deleted, or modified without creating modification problems IST2104

Normalization Principles Relational design principles for normalized relations: – To be a well-formed relation, every determinant must be a candidate key – Any relation that is not well-formed should be broken into two or more well-formed relations IST2105

Normalization Process 1.Identify all the candidate keys of the relation. 2.Identify all the functional dependencies in the relation. 3.Examine the determinants of the functional dependencies. If any determinant is not a candidate key, the relation is not well formed. In this case: a.Place the columns of the functional dependency in a new relation of their own. b.Make the determinant of the functional dependency the primary key of the new relation. c.Leave a copy of the determinant as a foreign key in the original relation. d.Create a referential integrity constraint between the original relation and the new relation. 4.Repeat step 3 as many times as necessary until every determinant of every relation is a candidate key. IST2106

Normalization Process: Exercise 1 IST2107 Step 1. Candidate keys: Step 2. Functional dependencies: Step 3. Determine if the relation is well-formed. If not, split the relation into multiple well-formed relations and specify all the primary keys, foreign keys and referential integrity constraints: Hint: If any determinant is not a candidate key, the relation is not well formed.

Normalization Process: Exercise 2 IST2108 Step 1. Candidate keys: Step 2. Functional dependencies: Step 3. Determine if the relation is well-formed. If not, split the relation into multiple well-formed relations and specify all the primary keys, foreign keys and referential integrity constraints: Hint: If any determinant is not a candidate key, the relation is not well formed.

Normalization Process: Exercise 3 IST2109 Step 1. Candidate keys Step 2. Functional dependencies GRADE(ClassName, Section, Term, Grade, StudentNumber, StudentName, Professor, ProfessorDepartment, Professor ) Step 3. Determine if the relation is well-formed. If not, split the relation into multiple well-formed relations and specify all the primary keys, foreign keys and referential integrity constraints: Hint: If any determinant is not a candidate key, the relation is not well formed.

True/False Quiz Given the functional dependency for the attributes of ENTITY1, X → (A, B, C), X is a candidate key for the relation ENTITY1 (A, B, C, X). Normalization is the process of removing all functional dependencies from a relation. In the normalization process, it is not necessary to identify all the functional dependencies in a relation. In the normalization process, if you find a candidate key that is not a primary key, then you have determined that the relation needs to be broken into two or more relations.

Summary of Chapter 2 Learn the concept of the relational model: entities, relations, relationships Learn the meaning and importance of keys, foreign keys, and related terminology Learn the meaning of functional dependencies Learn to apply a process for normalizing relations IST21011

Assignment 2: Relational Model Due: 11:59pm on Sunday, 2/1 IST21012