Assignment 5–2 For each new relation, Use DBDL to specify the relation scheme Give the functional dependencies Give the corresponding relation instance.

Slides:



Advertisements
Similar presentations
Unnormalized Form (UNF) student courses John CS363 CS334 CS323 Multi-Value attribute Common in reports 1.
Advertisements

Functional Dependencies and Normalization for Relational Databases
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Relational Database Design Algorithms and Further Dependencies.
1 Quiz 2. 2 One instructor cannot be at two or more class rooms at the same time. One class room cannot be shared by two or more instructors at the same.
1 Assignment 4 Map entities with relationships to relational schemas. Use DBDL to describe the table schemas.
Assignment Design Methodology A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the.
Functional Dependencies and Normalization for Relational Databases.
Boyce-Codd Normal Form (BCNF) Definition R in 1NF and Every determinant (the left side of a FD) is a candidate key. 1.
1 Normalization Chapter What it’s all about Given a relation, R, and a set of functional dependencies, F, on R. Assume that R is not in a desirable.
1 Design Methodology A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the process of design.
Project Phase I Phase II Due Monday, April 15 Groups 1.
CS 3630 Database Design and Implementation. First Normal Form (1NF) No multi-value attributes Done when mapping E-R model to relational schema DBDL 2.
1 CS 3630 Database Design and Implementation. 2 Final Exam 7:00 – 8:52 PM, Thursday, May 16 Section 1: Ull 009 Section 2: Ull Points –50 points.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
1 times table 2 times table 3 times table 4 times table 5 times table
Assignment 5-1 Functional Dependencies Attributes within one table True for all table instances Part of table schema (Assumptions) Cannot get FDs just.
CS 405G: Introduction to Database Systems 16. Functional Dependency.
1 Test1 N = {n: n is an integer and n  0} X = {x: x = n + 5, where n  N} Y = {y: y = 7 * n - 1, where n  N} List the three smallest elements of each.
Lecture9:Functional Dependencies and Normalization for Relational Databases Prepared by L. Nouf Almujally Ref. Chapter Lecture9 1.
Project – Phase II Derive Database Schema from E-R Model DBDL.
1 CS 3630 Database Design and Implementation. 2 Sets Foundation of relational database. Basic Operations Power set Mapping.
Organizing Data Revision: pages 8-10, 31 Chapter 3.
Functional Dependencies and Normalization for Relational Databases.
Logical Database Design (1 of 3) John Ortiz Lecture 6Logical Database Design (1)2 Introduction  The logical design is a process of refining DB schema.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
1 Functional Dependencies and Normalization Chapter 15.
CS 3630 Database Design and Implementation. 2 Functions y = f(x) x1 = x2  f(x1) = f(x2) Same x value, then same function value. Yes, it’s a function!
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
CS 3630 Database Design and Implementation. 2 Design Methodology Three main phases 1.Conceptual database design Understanding client data E-R (EER) Model.
CS 3630 Database Design and Implementation. Unnormalized Form (UNF) student courses John CS363 CS334 CS323 Multi-Value attribute Common in reports 2.
Lecture9:Functional Dependencies and Normalization for Relational Databases Ref. Chapter Lecture9 1.
Database Design – Lecture 6 Moving to a Logical Model.
Chapter 7 Functional Dependencies Copyright © 2004 Pearson Education, Inc.
Second Normal Form (2NF) A relation R is in 1NF, and every non-primary-key attribute is fully functionally dependent on the primary key Then R is in 2NF.
Quiz Where to Store Attributes of Relationship Staff (1) Interviews (0..*) Client Attributes: date, time, comment Staff (StaffNo, …) PK: StaffNo.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
CS 3630 Database Design and Implementation. Null Value The value of an attribute could be NULL NOT known at the moment or NOT Applicable Example Cell.
Ch 7: Normalization-Part 1
Tables Learning Support
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
Howard Paul. Sequential Access Index Files and Data File Random Access.
Al-Imam University Girls Education Center Collage of Computer Science 1 st Semester, 1432/1433H Chapter 10_part 1 Functional Dependencies and Normalization.
CS 3630 Database Design and Implementation. Joins Retrieve data from two or more tables Join Conditions PK and FK (Natural Join) Other attributes (Theta.
CS 3630 Database Design and Implementation
Tables & Relationships
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Database Design The Relational Model Text Ch5
CS 3630 Database Design and Implementation
ASSIGNMENT NO.-2.
Times Tables.
Assignment 4 Map entities with relationships to relational schemas.
Theory behind the relational engine
Theory behind the relational engine
CS 3630 Database Design and Implementation
Assignment 5–2 For each table, Give a meaningful name
Normalization 2NF & 3NF Presented by: Dr. Samir Tartir
CS 3630 Database Design and Implementation
فرایند بازاریابی.
CS 3630 Database Design and Implementation
Boyce-Codd Normal Form (BCNF)
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Normalization.
Database Normalisation
3 times tables.
6 times tables.
Presentation transcript:

Assignment 5–2 For each new relation, Use DBDL to specify the relation scheme Give the functional dependencies Give the corresponding relation instance -1 on Assignment on Assignment on Test1 1

Assignment 5–2 hours (NIN, ContractNo, eName, hours, hNo, hLoc) NIN ===> eName hNo ===> hLoc ContractNo ===> hNo, hLoc NIN, ContractNo ===> eName, hNo, hLoc, hours PK: NIN, ContractNo Not in 2NF NIN ===> eName ContractNo ===> hNo, hLoc How many tables (relations)? Staff: NIN ===> eName Contract: ContractNo ===> hNo, hLoc hours: NIN, ContractNo ===> hours 2

Assignment 5–2 2NF Staff (NIN, eName) PK: NIN AK: NONE FK: NONE FDs: NIN ===> eName Table (Relation) Instance (Remove duplicate records) NINeName 1135Smith J 1057Hocine D 1068White T 3

Assignment 5–2 2NF Contract (ContractNo, hNo, hLoc) PK: ContractNo AK: NONE FK: NONE FDs: ContractNo ===> hNo, hLoc hNo ===> hLoc Table (Relation) Instance (Remove duplicate records) ContractNo hNo hLoc C1024 H25 East Kilbride C1025 H24 Glasgow 4

Assignment 5–2 2NF Hours (NIN, ContractNo, hours) PK: ContractNo, NIN AK: NONE FK: NIN References Staff ContractNo References Contract FDs: NIN, ContractNo ===> hours Table (Relation) Instance NINContractNohours 1135 C C C C

Assignment 5–2 Not in 3NF Contract (ContractNo, hNo, hLoc) PK: ContractNo AK: NONE FK: NONE FDs: ContractNo ===> hNo, hLoc hNo ===> hLoc How many tables? Hotel (hNo, hLoc) Contract (ContractNo, hNo) 6

Assignment 5 – Part II 3NF Hotel (hNo, hLoc) PK: hNo AK: NONE FK: NONE FDs: hNo ===> hLoc Table (Relation) Instance hNo hLoc H25 East Kilbride H24 Glasgow 7

Assignment 5 – Part II 3NF Contract (ContractNo, hNo) PK: ContractNo AK: NONE FK: hNo References Hotel FDs: ContractNo ===> hNo Table (Relation) Instance ContractNo hNo C1024 H25 C1025 H24 8

Assignment 5–2 List the names of all relations of your final result. (not relationships!) Staff Hotel Contract Hours 9

Style Hours (NIN, ContractNo, hours) PK: NIN, ContractNo AK: None FK: NIN References Staff ContractNo References Contract FD: NIN, ContractNo ===> hours Table Instance NINeName 1135Smith J 1057Hocine D 1068White T Staff (NIN, eName) PK: NIN AK: None FK: None FD: NIN ===> eName Table Instance NINContractNohours 1135C C C C

Style Hours (NIN, ContractNo, hours) PK: NIN, ContractNo AK: None FK: NIN References Staff ContractNo References Contract FD: NIN, ContractNo ===> hours Table Instance NIN ContractNo hours 1135 C C C C Staff (NIN, eName) PK: NIN AK: None FK: None FD: NIN ===> eName Table Instance NIN eName 1135 Smith J 1057 Hocine D 1068 White T 11