Data Base System Lecture 6: Relational Model

Slides:



Advertisements
Similar presentations
The Relational Model J.G. Zheng May 15 th Introduction Edgar F. Codd, 1970 One sentence to explain relational database model: Data are organized.
Advertisements

Chapter IV Relational Data Model Pemrograman Sistem Basis Data.
The Relational Model Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
RELATIONAL DATABASES. Relational data Structure RELATION: Table with columns and rows ATTRIBUTE: Column of a relation DOMAIN: Set of allowable values.
Chapter 3 : Relational Model
CSC271 Database Systems Lecture # 5. Summary: Previous Lecture  Database languages  Functions of a DBMS  DBMS environment  Data models and their categories.
Relational Model (CB Chapter 4) CPSC 356 Database Ellen Walker Hiram College.
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Relations The Relational Data Model John Sieg, UMass Lowell.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
1 Minggu 2, Pertemuan 3 The Relational Model Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
1 Pertemuan 04 MODEL RELASIONAL Matakuliah: >/ > Tahun: > Versi: >
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.
Database Architecture The Relational Database Model.
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
Chapter One (Introduction) Objectives Introduction to Database Management Systems (DBMS) Relational Databases Model Restrictions of RD Database Life Cycle.
CS 3630 Database Design and Implementation. 2 Mathematical Relation A mathematical relation is a subset of a Cartesian Product. A1  A2  A3  …  An.
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.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 – Relational Model.
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
1 Mathematical Relation A mathematical relation is a subset of a Cartesian Product. A1  A2  A3  …  An = {(x1, x2, x3, …, xn): xi  Ai} R  A1  A2.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
The Relational Model Pertemuan 03 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Relational Database. Database Management System (DBMS)
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Announcements Reading for Monday –4.6 Homework 3 – Due 9/29.
12/2/2015CPSC , CPSC , Lecture 41 Relational Model.
L8-2-S1 Misc Topics © M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of.
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,
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
CSCI 6315 Applied Database Systems Review for Midterm Exam I Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
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.
Entity Relationship Model
Relational Model Database Management Systems, 3rd ed., Ramakrishnan and Gehrke, Chapter 3.
Chapter 2: Relational Model
The Relational Data Model and Relational Database Constraints
Tables and Their Characteristics
Database Design The Relational Model Text Ch5
Data Models.
CIS 207 The Relational Database Model
Chapter 2: Intro to Relational Model
The Relational Database Model
Data Base System Lecture 9: Rational Algebra and Relational Calculus
Chapter 3 The Relational Model.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
DATABASE SYSTEM.
Chapter 4+17 The Relational Model Pearson Education © 2014.
Chapter 4 The Relational Model Pearson Education © 2009.
The Relational Model Textbook /7/2018.
The Relational Model Transparencies
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Design tools and techniques for a relational database system
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 3 The Relational Model
RELATIONAL DATA MODEL - 1
Presentation transcript:

Data Base System Lecture 6: Relational Model By: Nur Uddin, Ph.D

What will we learn? The origins of the relational model. The terminology of the relational model. How tables are used to represent data. The connection between mathematical relations and relations in the relational model. Properties of database relations. How to identify candidate, primary, alternate, and foreign keys. The meaning of entity integrity and referential integrity. The purpose and advantages of views in relational systems.

Introduction The Relational Database Management System (RDBMS) has become the dominant data-processing software in use today. It is based on the relational data model proposed by E. F. Codd (1970). In the relational model, all data is logically structured within relations (tables). Each relation has a name and is made up of named attributes (columns) of data. Each tuple (row) contains one value per attribute. A great strength of the relational model is this simple logical structure.

Terminology Relation Attribute Domain A relation is a table with columns and rows. Relations are used to hold information about the objects to be represented in the database. Attribute An attribute is a named column of a relation. A relation is represented as a two dimensional table in which the rows of the table correspond to individual records and the table columns correspond to attributes. Domain A domain is the set of allowable values for one or more attributes.

Terminology (cont’d) Tuple Degree Cardinality A tuple is a row of a relation. Degree The degree of a relation is the number of attributes it contains. Cardinality The cardinality of a relation is the number of tuples it contains.

Mathematical Relation Suppose that we have two sets, D1 and D2, where D1 = {2,4} and D2 = {1, 3, 5}. The Cartesian product of these two sets, written D1 x D2, is the set of all ordered pairs such that the first element is a member of D1 and the second element is a member of D2.

Database Relation Relational schema Relational database schema A named relation defined by a set of attribute and domain name pairs. Example: {(branchNo: B005, street: 22 Deer Rd, city: London, postcode: SW1 4EH)} Relational database schema A set of relation schemas, each with a distinct name.

Properties of relation A relation has the following properties: the relation has a name that is distinct from all other relation names in the relational schema; each cell of the relation contains exactly one atomic (single) value; each attribute has a distinct name; the values of an attribute are all from the same domain; each tuple is distinct; there are no duplicate tuples; the order of attributes has no significance; the order of tuples has no significance, theoretically. (However, in practice, the order may affect the efficiency of accessing tuples.)

Relational Keys Superkey Candidate key Primary key Foreign key An attribute, or set of attributes, that uniquely identifies a tuple within a relation. Candidate key A superkey such that no proper subset is a superkey within the relation. Primary key The candidate key that is selected to identify tuples uniquely within the relation. Foreign key An attribute, or set of attributes, within one relation that matches the candidate key of some (possibly the same) relation.

Relational Keys