The Relational Model CIS 218. Entity A Person, Place, Thing or Transaction Something the user wants to track.

Slides:



Advertisements
Similar presentations
The Relational Model DB Chapter 2 (and some from chapter 4, 5) J.G. Zheng June 27 th 2005.
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.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
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 DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
The Relational Model Chapter Two. 2 Chapter Objectives Learn the conceptual foundation of the relational model Learn the conceptual foundation of the.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke’s Chapter Three: The Relational Model and Normalization.
Microsoft Access 1 Database Creation and Management.
Structured Query Language Part II Chapter Three CIS 218.
Chapter 14 Getting to First Base: Introduction to Database Concepts.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke Database Processing Chapter 3 Normalization.
The Relational Model Chapter Two (Excerpts) DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Microsoft Access 1 Database Creation and Management.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
N. J. Taylor Database Management Systems (DBMS) 1.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Chapter 3 The Relational Model and Normalization
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Database Basics CPSC 4670/ Purpose of a Database The purpose of a database is to keep track of things Unlike a list or spreadsheet, a database.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, Modified by Dr. Mathis 3-1 David M. Kroenke’s Chapter Three: The Relational.
The Relational Model Chapter Two DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd 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.
Database1 Database Creation and Management. About Database Development…. The course is not designed to train you as an IT specialist……. It is not about.
Chapter 2. The Relational Model IST2101. Chapter 1 Review Potential problems with Lists – Deletion – Update – Insertion Avoid these problems using a relational.
Relational Database. Database Management System (DBMS)
System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.
Slide 1 Chapter 03 The Relational Model and Normalization.
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.
Chapter 2. The Relational Model (cont.)
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Relational Theory and Design
3. Relational Model Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets 1.
+ Relational Model IST210 Class Lecture. + Premiere Products A new company that is going to sells random merchandise via sales representatives You have.
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
THE RELATIONAL MODEL I IST 210: Organization of Data IST210 1.
1. Convert a conceptual business process level REA model into a logical relational model 2. Convert a logical relational model into a physical implementation.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
© 2002 by Prentice Hall 1 The Relational Model David M. Kroenke Database Concepts 1e Chapter 2 2.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Database Design Chapter 9 Part-1: Concepts & Foreign Keys 1.
Chapter 3 The Relational Database Model. Database Systems, 10th Edition 2 * Relational model * View data logically rather than physically * Table * Structural.
Howard Paul. Sequential Access Index Files and Data File Random Access.
Logical Database Design and Relation Data Model Muhammad Nasir
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Three: The Relational Model and Normalization.
Microsoft Access 1 Database Creation and Management.
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Three: The Relational Model and Normalization.
COP Introduction to Database Structures
Client/Server Databases and the Oracle 10g Relational Database
Chapter 9 Part-1: Concepts & Foreign Keys
The Relational Model and Database Normalization
The Relational Model Chapter Two DATABASE CONCEPTS, 3rd Edition
RELATION.
Relational Databases.
CIS 155 Table Relationship
Database Management Systems (DBMS)
Translation of ER-diagram into Relational Schema
Chapter 9 Part-1: Concepts & Foreign Keys
Lingma Acheson Department of Computer and Information Science IUPUI
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
logical design for relational database
ICT Database Lesson 2 Designing a Database.
Microsoft Access Date.
Presentation transcript:

The Relational Model CIS 218

Entity A Person, Place, Thing or Transaction Something the user wants to track

Attribute A Property that describes an entity Also called a Field Title Author Number of Pages Subject ???

Attribute A Property that describes an entity

Identifier An attribute that names, or identifies, an entity instance May or may not be unique Ludwig

Primary Key A unique identifier

Relation A relation is a two-dimensional table that has specific characteristics 2-7

Characteristics of a Relation Consists of columns and rows Each row contains data about one entity Each columns contains data about one attribute of the entity All entries in a column are of the same kind Each cell of the table holds a single value Each column has a unique name No two rows may be identical 2-8

Is this a Relation? 2-9 EmployeeNumberPhoneLastName Abernathy Cadley Copley Jackson

Is this a Relation? 2-10 EmployeeNumberPhoneLastName Abernathy Cadley Copley Abernathy Jackson

Is this a Relation? 2-11 Employee Number PhoneName RobinAbernathy JessicaCadley RogerCopley GurpreetKaur JazmyneJackson

Is this a Relation? 2-12 Employee Number PhoneNameNumber Robin Jessica$ RogerFourteen Gurpreet Jazmyne

Is this a Relation? 2-13 EmployeeNumberFirstNameLastName 100MaryAbernathy 101JerryCadley 104AlexCopley 107MeganJackson

A Composite Key A primary key made up of two or more attributes (columns) For a key to be unique, often it must become a composite key – Example: How would I look up a grade? 2-14

A Candidate Key A candidate to become the primary key A unique identifier – SID, SSN 2-15

A Surrogate Key A unique, numeric value that is added to a relation to serve as the Primary Key Has no meaning to users Usually hidden in forms, queries and reports In Access, uses an AutoNumber 2-16

Relationships Associations between entities

Relationships Between Tables A table may be related to other tables – An Employee is assigned to a Car – A Student takes a Class To relate tables, create a foreign key – Also called a linking column A foreign key is a primary key from one table placed into another table 2-18

Foreign Key Example 2-19 Project ProjID ProjName MgrID Manager MgrID MgrName Foreign Key

Foreign Key Example 2-20 Department DeptID DeptName Location Employee EmpID DeptID EmpName Foreign Key

Foreign Key Example 2-21 Song SongID SongName Time Artist ArtistID ArtistName Foreign Key ArtistID

Referential Integrity Every foreign key value must match a value of an existing primary key Therefore, the primary key value must exist before the foreign key value is entered 2-22

2-23

Referential Integrity Each value of the Foreign Key OwnerID in PET must exist in The values of the Primary Key OwnerID in OWNER 2-24

Foreign Keys in Microsoft Access 2-25