CS 3630 Database Design and Implementation

Slides:



Advertisements
Similar presentations
Database Design: Normalization J.G. Zheng June 29 th 2005 DB Chapter 4.
Advertisements

Normalisation.
Unnormalized Form (UNF) student courses John CS363 CS334 CS323 Multi-Value attribute Common in reports 1.
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.
Assignment6-1 Assignment6-2 Due Wednesday, March 13 1.
Boyce-Codd Normal Form (BCNF) Definition R in 1NF and Every determinant (the left side of a FD) is a candidate key. 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.
5 Chapter 5 Normalization of Database Tables Example Database Systems: Design, Implementation, and Management, Rob and Coronel Special adaptation for INFS-3200.
July 14, 2015ICS 424: recap1 Relational Database Design: Recap of ICS 324.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
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.
Avoiding Database Anomalies
Data Normalization Normal is not something to aspire to, it's something to get away from. ~ Jodie Foster ~
Data Normalization Normal is not something to aspire to, it's something to get away from. ~ Jodie Foster ~
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.
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!
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.
Database Design – Lecture 9 Normalization Continued.
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
Normalization. 2 u Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data,
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.
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.
Howard Paul. Sequential Access Index Files and Data File Random Access.
Assignment 5–2 For each new relation, Use DBDL to specify the relation scheme Give the functional dependencies Give the corresponding relation instance.
CS 3630 Database Design and Implementation. 2 Mathematical Relation A mathematical relation is a subset of a Cartesian Product. A1  A2  A3  …  An.
CS 3630 Database Design and Implementation
Normalization.
CS 3630 Database Design and Implementation
SEEM3430: Information Systems Analysis and Design
CS 3630 Database Design and Implementation
A brief summary of database normalization
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Assignment 4 Map entities with relationships to relational schemas.
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
Relational Database.
Time management School of Rock.
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Boyce-Codd Normal Form (BCNF)
Normalization A337.
Normalization and Databases
Table Normal Forms.
CS 3630 Database Design and Implementation
Some Normalization Examples
CS 3630 Database Design and Implementation
Normalization.
Week of March th grade.
Chapter 8 – Part2 Database Design.
Boyce-Codd Normal Form (BCNF)
Chapter 14 Normalization.
Chapter 8 – Part2 Database Design.
Normalization February 28, 2019 DB:Normalization.
Database Normalisation
Normalization of DB relations examples Fall 2015
Sampath Jayarathna Cal Poly Pomona
NORMALIZATION FIRST NORMAL FORM (1NF):
Mapping an ERD to a Relational Database
Database Normalization.
Normalisation Un-normalised Data (UNF or 0NF) Data Attributes:
Some Normalization Examples
Presentation transcript:

CS 3630 Database Design and Implementation

Unnormalized Form (UNF) student courses Mike Rowe CS3630 CS3340 CS3230 Multi-Value attribute Common in reports 2NF and 3NF could be in one note.

First Normal Form (1NF) No multi-value attributes Done when mapping E-R model to relational schema DBDL

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 No Partial FDs on the PK.

Example Relation R (A, B, C, D, E, F) PK: A, B AK: None FK: None Functional Dependencies: A, B  All A  C B  E, F

Table Instance A B C D E F 1 x 10 100 cs se 1 y 10 200 cs ee Functional Dependencies: A, B  All A  C B  E, F

In 2NF? Relation R (A, B, C, D, E, F) PK: A, B AK: None FK: None Functional Dependencies: A, B  All A  C B  E, F

How Many Tables Relation R (A, B, C, D, E, F) PK: A, B AK: None FK: None Functional Dependencies: A, B  All A  C B  E, F

Decomposing Tables into 2NF Which attributes go to new tables? Which attributes stay in the original table? What is the PK? Which tables have the FK? How many records each table should have?

Decompose table R into 2NF R (A, B, C, D, E, F) Functional Dependencies: A, B  All A  C B  E, F R1 (A, C) PK: A AK: None FK: ? FDs: A  C R2 (B, E, F) PK: B B  E, F R (A, B, D) PK: A, B A, B  D

Decompose table R into 2NF R (A, B, C, D, E, F) Functional Dependencies: A, B  All A  C B  E, F R1 (A, C) PK: A AK: None FK: None FDs: A  C R2 (B, E, F) PK: B B  E, F R (A, B, D) PK: A, B FK: A references R1 B references R2 A, B  D

Table Instance R A B C D E F 1 x 10 100 cs se 1 y 10 200 cs ee A B D 1 x 100 1 y 200 2 x 300 2 y 400 R1 A C 1 10 2 20 R2 B E F x cs se y cs ee

Schedule Assignment 6-1 Due Thursday, March 1 At 5 PM Quiz 2 Wednesday, March 7 Covers A4 and A51, A61

Assignment 5-2 Due Monday, March 5 At 5 PM