1 Assignment 4 Map entities with relationships to relational schemas. Use DBDL to describe the table schemas.

Slides:



Advertisements
Similar presentations
The Relational Model J.G. Zheng May 15 th Introduction Edgar F. Codd, 1970 One sentence to explain relational database model: Data are organized.
Advertisements

Transform an ER Model into a Relational Database Schema
Relational Database Design Via ER Modelling
ER Modeling Case Studies
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.
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.
Translating from ER to Relationship Schema Adapted from Juliana Freire.
Relational Model Stores data as tables –Each column contains values about the same attribute –Each column has a distinct name –Each row contains values.
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.
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.
CS424 PK, FK, FD Normalization Primary and Foreign Keys Primary and foreign keys are the most basic components on which relational theory is based. Primary.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to- Relational Mapping.
Database Architecture The Relational Database Model.
The Relational Database Model
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Content Resource- Elamsari and Navathe, Fundamentals of Database Management systems.
DATA MODELING AND DATABASE DESIGN
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.
Introduction to Accounting Information Systems
Tutorial 3. This tutorial went through how to convert multiplicity numbering used in UML modelling to ERD, and vice versa. In the exam and assignments,
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.
Relational Data Model Ch. 7.1 – 7.3 John Ortiz Lecture 3Relational Data Model2 Why Study Relational Model?  Most widely used model.  Vendors: IBM,
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.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
The Relational Model J.G. Zheng Jan 2010 CIS 8040 Database Management Systems.
SE305 Database System Technology 23/10/2014 Quiz-2.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
Relational Theory and Design
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
CS 3630 Database Design and Implementation. Unnormalized Form (UNF) student courses John CS363 CS334 CS323 Multi-Value attribute Common in reports 2.
Order Database – ER Diagram Prepared by Megan Foster Fall Semester 2014.
Database Design – Lecture 6 Moving to a Logical Model.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
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.
ER- Relational Mapping (Based on Chapter 9 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Howard Paul. Sequential Access Index Files and Data File Random Access.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Assignment 5–2 For each new relation, Use DBDL to specify the relation scheme Give the functional dependencies Give the corresponding relation instance.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
CS 3630 Database Design and Implementation
Relational Database Design by ER- and EER-to- Relational Mapping
CS 3630 Database Design and Implementation
Multiplication table. x
Tables and Their Characteristics
CS 3630 Database Design and Implementation
Lecture # 13 (After 1st Exam)
Assignment 4 Map entities with relationships to relational schemas.
Implementation of Entity Relationships
CS 3630 Database Design and Implementation
Assignment 5–2 For each table, Give a meaningful name
CS 3630 Database Design and Implementation
CS 3630 Database Design and Implementation
Foreign key (FK) is defined as follows:
CS 3630 Database Design and Implementation
E-R DIAGRAMS TO RELATIONAL SCHEMA
From data needs to ER Model to relational DB Schema
Chapter 4 The Relational Model Pearson Education © 2009.
DBMS ER-Relational Mapping
Chapter 4 The Relational Model Pearson Education © 2009.
INSTRUCTOR: MRS T.G. ZHOU
Presentation transcript:

1 Assignment 4 Map entities with relationships to relational schemas. Use DBDL to describe the table schemas.

2 E1 att1 att2: composite (att21, att22, att23) att3: multi-value (limit unknown) composite (att31, att32, att33) Note: One instance of E1 can have multiple tuples of (att31, att32, att33). Different instances of E1 could share the same tuple of (att31, att32, att33). Primary Key: att1 E1 att1 att2: composite (att21, att22, att23) Primary Key: att1 NewEntity att1 att3: multi-value (limit unknown) composite (att31, att32, att33) Primary Key: ? NewAtt

3 E1 att1 att2: composite (att21, att22, att23) att3: multi-value (limit unknown) composite (att31, att32, att33) Note: One instance of E1 can have multiple tuples of (att31, att32, att33). Different instances of E1 could share the same tuple of (att31, att32, att33). Primary Key: att1 E1 (att1, att21, att22, att23) PK: att1 AK: NONE FK: NONE NewEntity (NewAtt, att1, att31, att32, att33) PK: NewAtt AK: None FK: att1 References E1

4 E2 E3 A1 B1: composite (B11, B12, B13) A2 B2 Primary Key: A1 Primary Key: B1 E2 (0..*) R (1..*) E3 Attribute: D1, D2 one-to-one? one-to-many? many-to-many? NewEntity D1 D2 A1 B1 (composite) PK? PK: C (new attribute as PK)

5 E2 E3 A1 B1: composite (B11, B12, B13) A2 B2 Primary Key: A1 Primary Key: B1 E2 (0..*) R (1..*) E3 Attribute: D1, D2 E2 (A1, A2) PK: A1 AK: NONE FK: NONE E3 (B11, B12, B13, B2) PK: B11, B12, B13 AK: NONE FK: NONE R1(A1, B11, B12, B13, C, D1, D2) PK: C (new attribute as PK) AK: NONE FK: A1 References E2 B11, B12, B13 References E3

6 E4 E5 A3: composite (A31, A32) B3 A4 B4: multi-value Primary Key: A4 B5 Primary Key: B3 E4 (0..*) R (0..1) E5 E4 (A31, A32, A4, B3) PK: A4 AK: NONE FK: B3 References E5 E6 (B3, B4, ID) PK: ID AK: NONE FK: B3 References E5 E5 (B3, B5) PK: B3 AK: NONE FK: NONE