The 1:M Relationship (continued)

Slides:



Advertisements
Similar presentations
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Advertisements

Chapter 5 Normalization of Database Tables
Advanced Data Modeling
The Relational Database Model
Chapter 6 Advanced Data Modelling
ITS232 Introduction To Database Management Systems
Normalization of Database Tables
1 Class Agenda – 09/20/2011  Answer questions about exam  Evaluate database design homework  Review database design homework for syntax and logic 
Chapter 2 The Relational Database Model
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
The Relational Database Model
Normalization of Database Tables
LIS 557 Database Design and Management William Voon Michael Cole Spring '04.
Normalization of Database Tables
Chapter 3 The Relational Database Model
The Relational Database Model. 2 Objectives How relational database model takes a logical view of data Understand how the relational model’s basic components.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Normalization A337. A337 - Reed Smith2 Structure What is a database? ◦ Tables of information  Rows are referred to as records  Columns are referred.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
The Relational Database Model
3 The Relational Model MIS 304 Winter Class Objectives That the relational database model takes a logical view of data That the relational model’s.
The Relational Database Model
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
The Relational Database Model
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
ITS232 Introduction To Database Management Systems Siti Nurbaya Ismail | Muhd Eizan Shafiq Abd Aziz Faculty of Computer & Mathematical Sciences, UiTM Kedah.
4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Degree Indicates number of entities or participants.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Database Systems, 9th Edition 1.  In this chapter, students will learn: That the relational database model offers a logical view of data About the relational.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 3 The Relational Database Model.
Chapter 3 The Relational Database Model. Logical View of Data Relational Database – Designer focuses on logical representation rather than physical –
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Department of Mathematics Computer and Information Science1 CS 351: Database Systems Christopher I. G. Lanclos Chapter 3: The Relational Database Model.
3 1 Database Systems The Relational Database Model.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 3 The Relational Database Model. Database Systems, 10th Edition 2 * Relational model * View data logically rather than physically * Table * Structural.
2 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Data Models Why data models are important About the basic data-modeling.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 3 The Relational Database Model.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Revised: 2 April 2004 Fred Swartz
The Relational Database Model
Relational Database Model
Tables and Their Characteristics
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Relational Model Characteristics
CIS 207 The Relational Database Model
Lecture 2 The Relational Model
THE RELATIONAL DATABASE MODEL
Chapter 3 The Relational Database Model
Chapter 3 The Relational Database Model.
part 1 with pages 1-32 and part 2 with pages 33-69
Chapter 6 Normalization of Database Tables
Normalization A337.
Database Systems: Design, Implementation, and Management Ninth Edition
Database solutions Chosen aspects of the relational model Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology.
DATABASE SYSTEM.
The Relational Database Model
Chapter # 3 The Relational Database Model.
DCT 2053 DATABASE CONCEPT Chapter 2.2 CONTINUE
Database Systems: Design, Implementation, and Management
Relational Database Operators
Chapter 3 The Relational Model
Presentation transcript:

The 1:M Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The 1:M Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The 1:M Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The 1:M Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The 1:1 Relationship One entity can be related to only one other entity, and vice versa Sometimes means that entity components were not defined properly Could indicate that two entities actually belong in the same table As rare as 1:1 relationships should be, certain conditions absolutely require their use Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The 1:1 Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The 1:1 Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship Can be implemented by breaking it up to produce a set of 1:M relationships Can avoid problems inherent to M:N relationship by creating a composite entity or bridge entity Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Implementation of a composite entity Yields required M:N to 1:M conversion Composite entity table must contain at least the primary keys of original tables Linking table contains multiple occurrences of the foreign key values Additional attributes may be assigned as needed Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

The M:N Relationship (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Data Redundancy Revisited Data redundancy leads to data anomalies Such anomalies can destroy the effectiveness of the database Foreign keys Control data redundancies by using common attributes shared by tables Crucial to exercising data redundancy control Sometimes, data redundancy is necessary Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Data Redundancy Revisited (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Data Redundancy Revisited (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Indexes Arrangement used to logically access rows in a table Index key Index’s reference point Points to data location identified by the key Unique index Index in which the index key can have only one pointer value (row) associated with it Each index is associated with only one table Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Indexes (continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Codd’s Relational Database Rules In 1985, Codd published a list of 12 rules to define a relational database system The reason was the concern that many vendors were marketing products as “relational” even though those products did not meet minimum relational standards Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Codd’s Relational Database Rules (Continued) Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Summary Tables are basic building blocks of a relational database Keys are central to the use of relational tables Keys define functional dependencies Superkey Candidate key Primary key Secondary key Foreign key Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel

Summary (continued) Each table row must have a primary key which uniquely identifies all attributes Tables can be linked by common attributes. Thus, the primary key of one table can appear as the foreign key in another table to which it is linked The relational model supports relational algebra functions: SELECT, PROJECT, JOIN, INTERSECT, UNION, DIFFERENCE, PRODUCT, and DIVIDE. Good design begins by identifying appropriate entities and attributes and the relationships among the entities. Those relationships (1:1, 1:M, and M:N) can be represented using ERDs. Database Systems: Design, Implementation, & Management, 7th Edition, Rob & Coronel