CIS 207 The Relational Database Model

Slides:



Advertisements
Similar presentations
The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Entity Relationship (ER) Modeling
The Relational Database Model – some relations you might want to avoid!!!
The Relational Database Model
ITS232 Introduction To Database Management Systems
The Relational Database Model
Chapter 2 The Relational Database Model
Relational Model Stores data as tables –Each column contains values about the same attribute –Each column has a distinct name –Each row contains values.
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.
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
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
Lecture 3 The Relational DB Model. Learning Objectives That the relational database model takes a logical view of data That the relational model’s basic.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
The Relational Database Model
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Relational Database: RDB Concepts
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.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
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.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
Management Information Systems by Prof. Park Kyung-Hye Chapter 7 (8th Week) Databases and Data Warehouses 07.
Logical Database Design and the Rational Model
Chapter 4 Logical Database Design and the Relational Model
Chapter 4: Logical Database Design and the Relational Model
The Relational Database Model
© 2014 by McGraw-Hill Education. This is proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
DESIGNING DATABASE APPLICATIONS
Tables and Their Characteristics
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Relational Model Characteristics
Lecture 2 The Relational Model
Chapter 4 Relational Databases
THE RELATIONAL DATABASE MODEL
Databases and Information Management
Chapter 3 The Relational Database Model
Chapter 3 The Relational Database Model.
The 1:M Relationship (continued)
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Systems: Design, Implementation, and Management Ninth Edition
Data Model.
Databases and Information Management
DATABASE SYSTEM.
Review of Week 1 Database DBMS File systems vs. database systems
The Relational Database Model
Chapter # 3 The Relational Database Model.
DCT 2053 DATABASE CONCEPT Chapter 2.2 CONTINUE
Database Dr. Roueida Mohammed.
Database Systems: Design, Implementation, and Management
Presentation transcript:

CIS 207 The Relational Database Model

In this lecture, you will learn: That the relational database model takes a logical view of data That the relational database model’s basic components are entities and their attributes, and relationships among entities How entities and their attributes are organized into tables About relational database operators, the data dictionary, and the system catalog How data redundancy is handled in the relational database model Why indexing is important

Logical View of Data Relational Database Designer focuses on logical representation rather than physical Use of table advantageous Structural and data independence Related records stored in independent tables Logical simplicity Allows for more effective design strategies

Logical View of Data (con’t.) Entities and Attributes Entity is a person, place, event, or thing about which data is collected Attributes are characteristics of the entity Tables Holds related entities or entity set Also called relations Comprised of rows and columns

Table Characteristics Two-dimensional structure with rows and columns Rows (tuples) represent single entity Columns represent attributes Row/column intersection represents single value Tables must have an attribute to uniquely identify each row

Table Characteristics (con’t.) Column values all have same data format Each column has range of values called attribute domain Order of the rows and columns is immaterial to the DBMS

Keys One or more attributes that determine other attributes Key attribute Composite key Full functional dependence Entity integrity Uniqueness No ‘null’ value in key

Example Tables

Simple Relational Database

Keys (con’t.) Superkey Candidate key Primary key Secondary key Uniquely identifies each entity Candidate key Minimal superkey Primary key Candidate key to uniquely identify all other attributes in a given row Secondary key Used only for data retrieval Foreign key Values must match primary key in another table

Integrity Rules Entity integrity Referential integrity Ensures all entities are unique Each entity has unique key Referential integrity Foreign key must have null value or match primary key values Makes it impossible to delete row whose primary key has mandatory matching foreign key values in another table

Relational Database Operators Relational algebra determines table manipulations Key operators SELECT PROJECT JOIN Other operators INTERSECT UNION DIFFERENCE PRODUCT DIVIDE

Data Dictionary and System Catalog Provides detailed account of all tables found within database Metadata Attribute names and characteristics System catalog Detailed data dictionary System-created database Stores database characteristics and contents Tables can be queried just like any other tables Automatically produces database documentation

Relationships within Relational Database Relationship classifications 1:1 1:M M:N E-R Model ERD Maps E-R model Chen Crow’s Feet

ERD Symbols Rectangles represent entities Diamonds represent the relationship(s) between the entities “1” side of relationship Number 1 in Chen Model Bar crossing line in Crow’s Feet Model “Many” relationships Letter “M” and “N” in Chen Model Three pronged “Crow’s foot” in Crow’s Feet Model

Example 1:M Relationship

Example 1:M Relationship

Example M:N Relationship

Example M:N Relationship

Converting M:N Relationship to Two 1:M Relationships

Converting M:N Relationship to Two 1:M Relationships (con’t.)

Converting M:N Relationship to Two 1:M Relationships (con’t.)

Converting M:N Relationship to Two 1:M Relationships (con’t.)

Data Redundancy Revisited Foreign keys can reduce redundancy Some redundancy is desirable Called controlled redundancy Speed Information requirements