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 206 100 Points –50 points.

Slides:



Advertisements
Similar presentations
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.
Advertisements

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.
Logical Database Design
Chapter 6 Methodology Logical Database Design for the Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
1 6 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology.
Entity-Relationship Model and Diagrams (continued)
1 Methodology : Conceptual Databases Design © Pearson Education Limited 1995, 2005.
Methodology Logical Database Design for the Relational Model
Lecture Fourteen Methodology - Conceptual Database Design
1 Design Methodology A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the process of design.
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.
Methodology Conceptual Database Design
LOGICAL DATABASE DESIGN
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Mapping ERM to relational database
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
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.
Methodology - Conceptual Database Design Transparencies
Methodology Conceptual Databases Design
1 Chapter 15 Methodology Conceptual Databases Design Transparencies Last Updated: April 2011 By M. Arief
PLUG IT IN 3 Fundamentals of Relational Database Operations.
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.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
Methodology: Conceptual Databases Design
Team Dosen UMN Database Design Connolly Book Chapter
© Pearson Education Limited, Chapter 9 Logical database design – Step 1 Transparencies.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
Methodology - Conceptual Database Design
CS 3630 Database Design and Implementation. 2 DreamHome Branch (branchNo, street, city, state, zipcode, phone1, phone2, phone3) Staff (staffNo, firstName,
CS 3630 Database Design and Implementation. 2 E-R Model (II) Keys To identify records in a table Candidate Key Primary Key Alternate Key Composite Key.
1 E-R Model (II) Keys To identify records in a table Candidate Key Primary Key Alternate Key Composite Key.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
In this session, you will learn to: Map an ER diagram to a table Objectives.
1 Chapter 17 Methodology - Local Logical Database Design.
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. Database Schema Branch (Bno…) Staff (Sno…Bno) Owner (Ono…) PropertyForRent (Pno…Ono) Renter (Rno…) Viewing.
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.
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Week 7-8 DBMS ER-Relational Mapping. ER-Relational Mapping.
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.
1 6 Concepts of Database Management, 5 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology Spring 2006.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
CS 3630 Database Design and Implementation
Methodology Conceptual Databases Design
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Methodology Conceptual Database Design
CS 3630 Database Design and Implementation
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.
CS 3630 Database Design and Implementation
Assignment 4 Map entities with relationships to relational schemas.
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Methodology Conceptual Databases Design
DBMS ER-Relational Mapping
Presentation transcript:

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 on design –50 points on SQL Open Book/Note/Computer Do it yourself

Set Theory 3

Relational Algebra Selection :  (predicate) (R) Projection :  Att1, Att3 (R) Cartesian Product: R  S Theta Join : R p S Natural Join :R S Out Join : R S 4

5 Design Methodology A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the process of design. Three main phases 1.Conceptual database design E-R Model 2.Logical database design Mapping E-R Model to (relational) database schema (DBDL) Normalization 3.Physical database design

6 Mapping Entity Multi-value and Composite Attribute Student studentNo Name: Composite (first, last) CoursesTaken: Multi-Value... Table Schema Student (studentNo, firstName, lastName...) AcademicProg(studentNo, CourseID) (one student will have multiple records in the table)

7 Mapping Relationships EntityOne (1) Related (0..*) EntityTwo Owner (1) Owns (0..*) Property One-to-Many Parent table: EntityOne / Owner Copy PK of parent table into child table as FK EntityThree (0..*) Related (1..*) EntityFour Staff (1..*) AssignedTo (0..*) Ward Many-to-Many Create a new table One-to-One

8 Mapping Relationships Entity3 (0..*) Related (1..*) Entity4 Att1, Att2 Entity3 (A1, A2, A3) Entity4 (B1, B2, B3, B4) NewTable (A1, B1, B2, Att1, Att2, NewAtt) PK: NewAtt AK: ? FK: A1 References Entity3 B1, B2 References Entity4

9 How to Describe a Table Schema? Database Design Language (DBDL) Branch (Bno, Street, City, State, Zipcode, Phone) PK: Bno AK: Street, City, Zipcode Phone FK: None Staff (Sno, firstName, lastName, Address, Bno ) PK: Sno AK: None FK: Bno references Branch Client (Cno, firstName, lastName, Phone, MaxRent, PrefType) PK: Cno AK: None FK: None Viewing (Rno, Pno, ViewDate, Comment) PK: Rno, Pno, Vie wDate AK: None FK: Rno references Client (Cno) Pno references Property No multi-value attributes, no composite attributes. 1NF

10 Design Methodology A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the process of design. Three main phases 1.Conceptual database design E-R (EER) Model 2.Logical database design Mapping E-R Model to (relational) database schema (Derive table / database schema) Normalization 3.Physical database design

11 Normalization Why? Functional Dependency 1NF 2NF 3NF BCNF DBDL for schema Instance to show records

R1 (A, C) Primary Key: A Alternate Key: None Foreign Key: None A ---> C R2 (B, E, F) Primary Key: B Alternate Key: None Foreign Key: None B ---> E, F R3 (A, B, D) Primary Key: A, B Alternate Key: None Foreign Key: A References R1 B References R2 A, B ---> D 12 R (A, B, C, D, E, F) Functional Dependencies: A, B ---> All A ---> C B ---> E, F Decompose table R into BCNF

Table Instance R A B C D E F 1 x cs se 1 y cs ee 2 x cs se 2 y cs ee R1 A C R2 B E F x cs se y cs ee R3 A B D 1 x y x y

14 Database Queries Tables needed Join condition Group By Outer Join and Sub-Query All clients without class today