1 Design Methodology A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the process of design.

Slides:



Advertisements
Similar presentations
ER Modeling Case Studies
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.
Relational Model (CB Chapter 4) CPSC 356 Database Ellen Walker Hiram College.
Logical Database Design
Assignment6-1 Assignment6-2 Due Wednesday, March 13 1.
1 6 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology.
Lecture Fourteen Methodology - Conceptual Database 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.
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.
Methodology Conceptual Database Design
Relational Database Management System A type of database in which records are stored in relational form is called relational database management system.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Chapter 3)
LOGICAL DATABASE DESIGN
APPENDIX C DESIGNING DATABASES
Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial Password: UWPstudent Password is case sensitive.
Introduction to Databases. Case Example: File based Processing Real Estate Agent’s office Property for sale or rent Potential Buyer/renter Staff/employees.
Lecture4: Informal guidelines for good relational design Mapping ERD to Relation Ref. Chapter3 Lecture4 1.
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.
Chapter 11 (I) CIS458 Sungchul Hong. Chapter 11 - Objectives How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated.
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.
Chapter 9 Methodology - Logical Database Design Chapter 16 in Textbook.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
DATABASE MGMT SYSTEM (BCS 1423) Chapter 5: Methodology – Conceptual Database 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.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
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.
CS 3630 Database Design and Implementation. Assignment 1 2 What is 3630?
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
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.
Software School of Hunan University Database Systems Design Part III : Mapping ER Diagram to Relational Schema.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
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.
Database Design – Lecture 7
Lecture4: Informal guidelines for good relational design Mapping ERD to Relation Prepared by L. Nouf Almujally Ref. Chapter3 Lecture4 1.
Chapter 4 Practice Problem Solutions. A list (Bno, Street, Area,Tel_No, Fax_No) of branches located in Bay Area Branch (Bno, Street, Area, City, Pcode,
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.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
Howard Paul. Sequential Access Index Files and Data File Random Access.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
Overview/Review of DB Logical Design ER Model to Relational Model Mapping.
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
CS 3630 Database Design and Implementation
Assignment 4 Map entities with relationships to relational schemas.
The Relational Database Model
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Logical Database Design
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
DBMS ER-Relational Mapping
Presentation transcript:

1 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 Understanding client data E-R (EER) Model Agreement between clients and designers E-R Model could be used for any database system 2.Logical database design Mapping E-R Model to (relational) database schema Normalization 3.Physical database design

2 Mapping E-R Model to Relational Database Schema 1.Entity type  Table schema Composite Attributes Multi-Value Attributes 2.How to maintain relationships? Primary Key and Foreign Key Many-to-Many

3 How to maintain relationships? Foreign Key Primary key of another relation (table) Representing relationship between two relations (tables)

4 Foreign Key: Examples Branch (Bno, Street, City, State, Zipcode, Phone) Staff (Sno, firstName, lastName, Address, Bno ) Owner (Ono, firstName, lastName, Phone (Multi-Value)) PropertyForRent (Pno, Street, City, State, Zipcode, Ono) Client (Cno, firstName, lastName, Phone, MaxRent, PrefType) Viewing (Cno, Pno, ViewDate, Comment)

5 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 Viewing (Rno, Pno, ViewDate, Comment) PK: Rno, ViewDate AK: None FK: Rno references Client (Cno) Pno references Property Multiple AK/FK on different lines! Viewing (Rno, Pno, ViewDate, Comment) PK: Rno, ViewDate AK: None FK: Rno, Pno FK: Rno references Client (Cno) Pno references Property One FK! Not two! References!

6 Mapping Strong Entities to Relation (Table) Schemas Replacing composite attributes with simple attributes Adding new tables to remove multi- value attributes

7 Replacing Composite Attributes with Simple Attributes Name: Composite (FirstName, LastName) Use two atriibutes: FirstName LastName Address : Compsite (Street, City, State, Zipcode) Use four attributes: Street City State Zipcode Performance issue

8 Composite Attributes staffNoNameAddress... SL21John White1 main street, Platteville, WI SG37Ann Beech15 University Dr, Madison, WI SA9Mary Howe908 Western avenue, Dubuque, IA Search on state or zip code

9 Simple Attributes staffNofirstNamelastNameStreetCityStatezip SL21JohnWhite1 main streetPlattevilleWI53818 SG37AnnBeech15 University DrMadisonWI53706 SA9MaryHowe908 Western avenue DubuqueIA Search on state or zip code

10 Removing Multi-Value Attributes No multi-value attributes in relational databases First Order Logic No sets as set elements

11 Multi-Value Attributes branchNostreetcitystatezipCodetelNo B0011 main street PlattevilleWI B00215 university drive MadisonWI ………………

12 Removing Multi-Value Attributes without Losing Data Entity Type in E-R Model Branch branchNo... telNo: multi-value How to Store telNo? phoneOne phoneTwo (When we know the limit of phone numbers at a branch: at most two) Staff staffNo homePhone workPhone cellPhone...

13 Each Branch Has at Most Three Phone Numbers branchNostreet...phone1phone2phone3 B0011 main street B00215 university drive ……………

14 Home Phone, WorkPhone and Cell Phone staffNostreet...homePhoneworkPhonecellPhone SL211 main street SG3715 university drive SA79……

15 Multi-Value Attributes Without Limit Entity Type in E-R Model Branch branchNo... telNo: multi-value (NO LIMIT!) More Examples Student Major Work Experience Research publications...

16 Replacing Multi-Value Attributes branchNo...telNo B B ……… branchNoStreetCityStatezipCode B001 B002 … branchNotelNo B B B B B …… One table  two tables Multi-Value attribute  multiple records Primary Key  Foreign Key

17 Replacing Multi-Value Attributes Entity Type in E-R Model Branch branchNo... telNo: multi-value (NO LIMIT!) How to Store telNo? Remove it from Branch and create a new table! BranchPhone branchNo telPhone What is the PK? Assumption: two branches don’t share the same phone # Does it have a FK?

18 Mapping Entity Type to Table Schema Entity Type in E-R Model Branch branchNo address: composite (street, city, state, zipCode) telNo: multi-value (with or without limit!) Table Schema (DBDL) Branch (branchNo, street, city, state, zip) PK: branchNo AK: street, city, zip FK: NONE BranchPhone (branchNo, telPhone) PK: telPhone AK: NONE FK: branchNo references Branch

19 Entity Type in E-R Model Staff staffNo... DOB workExperince: multi-value Composite (start, end, org, position) Store workExperince with staffNo in a new Table! WorkExperience staffNo start end org position PK? Could create a new PK attribute (workExpID) FK? Mapping Entity Type to Table Schema

20 Storing Work Experience Entity Type in E-R Model Staff staffNo... DOB workExperince: multi-value Composite (start, end, org, position) Table Schema (DBDL) Staff (staffNo,..., DOB) PK: staffNo AK: NONE FK: NONE WorkExperience(workExpID, staffNo, start, end, org, position) PK: workExpID AK: ? FK: staffNo references Staff

21 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 Understanding client data E-R (EER) Model Contract between clients and designers E-R Model could be used for any database system 2.Logical database design Mapping E-R Model to (relational) database schema Normalization 3.Physical database design

22 Mapping E-R Model to Relational database schema (DBDL) Branch (Bno, Street, City, State, Zipcode) PK: Bno AK: Street, City, Zipcode Phone FK: None BranchPhone (branchNo, telPhone) PK: branchNo, telPhone AK: NONE FK: branchNo references Branch Staff (Sno, firstName, lastName, Address, Bno ) PK: Sno AK: None FK: Bno references Branch WorkExperience(staffNo, start, end, org, position) PK: staffNo, start, org AK: NONE FK: staffNo references Staff No multi-value attributes, no composite attributes.

Assignment 4 Due Wednesday, Feb 20 23