Assignment6-1 Assignment6-2 Due Wednesday, March 13 1.

Slides:



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

Relational Model (CB Chapter 4) CPSC 356 Database Ellen Walker Hiram College.
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
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 Minggu 2, Pertemuan 3 The Relational Model Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
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.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Thomas Connolly and Carolyn Begg’s
Relational Database Management System A type of database in which records are stored in relational form is called relational database management system.
LOGICAL DATABASE DESIGN
Database Architecture The Relational Database Model.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial Password: UWPstudent Password is case sensitive.
Chapter 3 Relational Model Chapter 4 in Textbook.
CSC271 Database Systems Lecture # 6. Summary: Previous Lecture  Relational model terminology  Mathematical relations  Database relations  Properties.
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Relational Model Session 6 Course Name: Database System Year : 2012.
Chapter 4 The Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Chapters 17 & 18 Physical Database Design Methodology.
RAJIKA TANDON DATABASES CSE 781 – Database Management Systems Instructor: Dr. A. Goel.
Module 3: The Relational Model.  Overview Terminology Relational Data Structure Mathematical Relations Database Relations Relational Keys Relational.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
1 CS 3630 Database Design and Implementation. 2 Sets Foundation of relational database. Basic Operations Power set Mapping.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
Relational Database. Database Management System (DBMS)
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.
Creating Tables and Inserting Records -- Not easy to edit! -- check constraints! Create table test1 ( C1 char(5) primary key, C2 Varchar2(15) not null.
CS 3630 Database Design and Implementation. Database Schema Branch (Bno…) Staff (Sno…Bno) Owner (Ono…) PropertyForRent (Pno…Ono) Renter (Rno…) Viewing.
Relational Theory and Design
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
12/2/2015CPSC , CPSC , Lecture 41 Relational Model.
CS 3630 Database Design and Implementation. Unnormalized Form (UNF) student courses John CS363 CS334 CS323 Multi-Value attribute Common in reports 2.
Department of Mathematics Computer and Information Science1 CS 351: Database Systems Christopher I. G. Lanclos Chapter 3: The Relational Database Model.
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
Introduction to Database System. 1. Define Database, Database Management System and Database System. Explain the components of DBMS with its advantages.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
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.
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.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
Chapter 3: Relational Databases
Lecture 03 Constraints. Example Schema CONSTRAINTS.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Mapping ER to Relational Model Each strong entity set becomes a table. Each weak entity set also becomes a table by adding primary key of owner entity.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Logical Database Design and Relation Data Model Muhammad Nasir
Chapter 4 The Relational Model Pearson Education © 2009.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
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
Constraints AND Examples
Chapter 3 The Relational Model.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
CS 3630 Database Design and Implementation
The Relational Model Transparencies
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Database Dr. Roueida Mohammed.
Integrity 5/5/2019 See scm-intranet.
Constraints AND Examples
Chapter 3 The Relational Model
Presentation transcript:

Assignment6-1 Assignment6-2 Due Wednesday, March 13 1

Relational Integrity Entity Integrity Referential Integrity Enterprise Constraints 2

Null Value The value of an attribute could be NULL NOT known at the moment or NOT Applicable Example Cell Phone number BranchNo in Staff table if BranchNo is not required for all staff 3

RDBMS Relational DBMS should be able to handle NULL values. One issue Null = Null? List all staff who have not been assigned to a branch yet. BranchNo = Null -- Will not work BranchNo is null - This will work 4

Entity Integrity In a base relation, no attribute of the primary key can be NULL. Candidate Key: Minimum set of attributes to uniquely identify records. 5

Referential Integrity Foreign key Must match a primary key in the parent relation Or Wholly NULL For any table instance! 6

FK of Staff: Bno references Branch Which branch is SA200 in? Foreign key Must match a primary key in the parent relation, or Wholly NULL SG363 is OK: has not been signed to a branch yet Branch BnoPhone… B101 B205 Staff SnoPhoneBno SG100B101 SG363Null SA200B000 7

FK of Booking: (HotelNo, RoomNo) Which hotel is booking 001 for? Which room is booking 002 for? Foreign key Must match a primary key in the parent relation, or (Wholly NULL) Room HotelnoRoomNo… H101R001 H101R009 H109R001 Booking HotelNoRoomNoBookingNoGuestNo NullR G100 H101Null 002G200 H101R G200 8

Enterprise Constraints Business rules need to be enforced in database Functional Dependency Domain for each attribute HotelRoom (HotelNo, RoomNo…Type…) Type is a string, but three possible values: Family, Double, Single Trigger 9

Schedule Friday No Class Monday, March 11 Quiz2 Wednesday, March 13 Assignment6-2 Wednesday, March 20 Test1 10

Quiz 2 (25 points) Monday, March 11 Lab 206 Using Computers and Drop Files Derive table schemas from E-R Model (Mapping E-R Model to Database Schema) DBDL Functional Dependency Note11 – Note15 Assignment 4, 5-1 and