The Relational Model DB Chapter 2 (and some from chapter 4, 5) J.G. Zheng June 27 th 2005.

Slides:



Advertisements
Similar presentations
Database Design: Normalization J.G. Zheng June 29 th 2005 DB Chapter 4.
Advertisements

The Relational Model J.G. Zheng May 15 th Introduction Edgar F. Codd, 1970 One sentence to explain relational database model: Data are organized.
Concepts of Database Management Seventh Edition
Lab Exercise This Week PHP Basics See last Friday’s slides for requirements Make sure you show the final results to TA to get credit 1IST210.
The Relational Model Chapter Two. 2 Chapter Objectives Learn the conceptual foundation of the relational model Learn the conceptual foundation of the.
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.
Chapter 14 Getting to First Base: Introduction to Database Concepts.
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 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
Database Architecture The Relational Database Model.
The Relational Database Model
The Relational Database Model
Concepts of Database Management, Fifth Edition
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.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
10/17/2012ISC471/HCI571 Isabelle Bichindaritz 1 Technologies Databases.
The Relational Database Model
Concepts of Database Management Seventh Edition
Databases. Not All Tables Are Created Equal Spreadsheets use tables to store data and formulas associated with that data The “meaning” of data is implicit.
Chapter 2. The Relational Model IST2101. Chapter 1 Review Potential problems with Lists – Deletion – Update – Insertion Avoid these problems using a relational.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
The Relational Model J.G. Zheng Jan 2010 CIS 8040 Database Management Systems.
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.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Relational Theory and Design
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.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
THE RELATIONAL MODEL I IST 210: Organization of Data IST210 1.
1 2 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra.
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,
3 1 Database Systems The Relational Database Model.
Exploring Microsoft Access Chapter 5 One-to-Many Relationships: Subforms and Multiple Table Queries.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
1 6 Concepts of Database Management, 5 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology Spring 2006.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Normalization ACSC 425 Database Management Systems.
Chapter 4 The Relational Model Pearson Education © 2009.
Southern Methodist University CSE CSE 2337 Introduction to Data Management Chapter 2.
Database, tables and normal forms
Databases – Exam questions
The Relational Database Model
The Relational Model and Database Normalization
The Relational Model Chapter Two DATABASE CONCEPTS, 3rd Edition
Relational Databases.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Relational Model Characteristics
Data Base System Lecture 6: Relational Model
Chapter 4 The Relational Model Pearson Education © 2009.
The Relational Database Model
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
Design tools and techniques for a relational database system
Chapter 4 The Relational Model Pearson Education © 2009.
Database Systems: Design, Implementation, and Management
Presentation transcript:

The Relational Model DB Chapter 2 (and some from chapter 4, 5) J.G. Zheng June 27 th 2005

Overview Relational model terminologies and foundations Some design concepts

Introduction Edgar F. Codd, 1970 One sentence to explain relational database model: Data are organized in relations (tables), which are linked (relationship) by keys

Relation A relation is a two-dimensional table that has specific characteristics: The table consist of rows and columns Rows contain data about an entity instances All values in a row describes the same entity instance Columns contain data about attributes of the entity All values in a column are of the same kind

Relation (continued) Relations specific characteristics go on: Cells of the table hold a single value Each row is distinct Each column has a unique name The order of the rows is unimportant The order of the columns is unimportant

Non-Relation Examples

Relation Examples And, any tables in page 92 and 93

Relation Terminology Contrast TableRowColumn *EntityRecordField Relation[Tuple]Attribute

Keys A key is one or more columns of a relation that is used to identify a record Primary key Foreign key

Primary Key Primary key The value of this key column uniquely identifies a single record (row) There is only one primary key for a table Candidate Key A candidate to become the primary key There can be multiple candidate keys for a table Alternate key

Composite Key A key that contains two or more attributes (columns) Example FirstName + LastName FirstName + LastName + BirthDate FirstName + LastName + BirthDate + BirthCity …

Surrogate Key/Artificial Key Its a key created arbitrarily to replace the natural key Typically used in place of a composite key Usually it has no real meaning Example We can create a ReviewID in the BookReviews table to replace the original composite key

Relationship and Foreign Key Relationship defines how tables (relations) are linked Two tables are linked by a pair of keys The primary key of one table The foreign key in the linked table These two keys are of the same kind

Relationship Example Primary Key (PK) Foreign Key

Relationship Types One-to-one Example: students and GSU network accounts One-to-many Example: students and diplomas *Many-to-many Example: students and professors

Referential Integrity Every value of a foreign key must match a value of the primary key For example (Premiere Products database) In Customer table, RepNum is a foreign key (linked to the Rep table where RepNum is the primary key). Then every value of RepNum in the Customer table must exist in the Rep table

Relational Algebra Selection Projection Join …

Exercise Define and enforce relationship for your database assessment tables

Using MS Access Exercise: using query designer (QBE) to query AmazonBooks Choosing columns Specifying criteria Sorting Calculating

Summary Understand three important concepts of relational database model Relation Keys Primary key, candidate key, alternate key Composite key Natural key, surrogate key, artificial key Foreign key Relationship

Good Resources Edgar Frank Codd MS Access tutorial