The relational model1 The relational model Mathematical basis for relational databases.

Slides:



Advertisements
Similar presentations
Data Bits Models Classes & Schemes Rows & Tables Keys Associations $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit.
Advertisements

Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Relations The Relational Data Model John Sieg, UMass Lowell.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
Fundamentals of Relational Database Yong Choi School of Business CSUB, Bakersfield.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5- 1.
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.
Database Systems Chapter 5 ITM 354. Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
1 Pertemuan 04 MODEL RELASIONAL Matakuliah: >/ > Tahun: > Versi: >
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.
Chapter 5 Relational Model Concepts Dr. Bernard Chen Ph.D. University of Central Arkansas.
CS 380 Introduction to Database Systems (Chapter 5: The Relational Data Model and Relational Database Constraints)
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
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.
Module Title? DBMS E-R Model to Relational Model.
44220: Database Design & Implementation Logical Data Modelling Ian Perry Room: C48 Tel Ext.: 7287
Relational Model Session 6 Course Name: Database System Year : 2012.
1 The Relational Data Model, Relational Constraints, and The Relational Algebra.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Content Resource- Elamsari and Navathe, Fundamentals of Database Management systems.
Database Management System Lecture 6 The Relational Database Model – Keys, Integrity Rules.
Relational Data Model. A Brief History of Data Models  1950s file systems, punched cards  1960s hierarchical  IMS  1970s network  CODASYL, IDMS 
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints.
Fundamentals of Relational Database Yong Choi School of Business CSUB, Bakersfield.
Topic 5 The Relational Data Model and Relational Database Constraints Faculty of Information Science and Technology Mahanakorn University of Technology.
Instructor: Churee Techawut Basic Concepts of Relational Database Chapter 5 CS (204)321 Database System I.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 5 The Relational Data Model.
10/9/20151 The Relational Data Model TCU Database Systems Last update: September 2004 Reference: Elmasri 4 th edition, chapter 5.
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.
METU Department of Computer Eng Ceng 302 Introduction to DBMS The Relational Data Model and Relational Database Constraints by Pinar Senkul resources:
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
The Relational Model Pertemuan 03 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
Module Coordinator Tan Szu Tak School of Information and Communication Technology, Politeknik Brunei Semester
System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.
1 CS 430 Database Theory Winter 2005 Lecture 4: Relational Model.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Relational Model E.F. Codd at IBM 1970 Chapter 3 (ed. 7 – Chap. 5)
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
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,
CS34311 The Relational Model. cs34312 Why Relational Model? Currently the most widely used Vendors: Oracle, Microsoft, IBM Older models still used IBM’s.
Database Systems Logical Data Modelling Tutor:Ian Perry Tel: Web:
Lecture 03 Constraints. Example Schema CONSTRAINTS.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
FEN Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse.
Chapter 4 The Relational Model Pearson Education © 2009.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
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.
Lecture 2 The Relational Model
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
02 - The Relational Database Model
The Relational Model Transparencies
Chapter 4 The Relational Model Pearson Education © 2009.
Design tools and techniques for a relational database system
The Relational Data Model
Chapter 3 The Relational Model
Presentation transcript:

The relational model1 The relational model Mathematical basis for relational databases

The relational model2 A bit of history Before 1970: Other types of databases –Hierarchical databases –Network databases 1970 –Codd publishes his famous paper on the relational model 1970’es implementation of the relational model –1976 IBM System R

The relational model3 Informal terminology Database = collection of relations Relation (”table”) = set of tuples Tupel (”row”) = list of data

The relational model4 Formal definitions (structure) Relational schema R(A 1,..., A n ) –List of attributes A 1,..., A n –Degree of a relation = number of attributes (n) An attribute has a domain A domain D is a set of atomic values like –All Danish first names –Danish post codes

The relational model5 Formal definitions (state) Relational state of the relational schema R(A 1,..., A n ) –Set of tuples each containing n attributes r = {t 1,..., t k } Each tuples has n values –t = v i  domain(A i ) or v i = null null is a special value (in every domain) –Data does not exist. –Data unknown (for now).

The relational model6 Characteristics of relations Relation = set of tuples –Never 2 equal element in a set  never 2 equal tuples in a relation. –No order among element in a set  no order among tuples in a relation. In a relational schema the order among attributes matter.

The relational model7 Constraints Different types of ”rules” –Domain constraints Every value must be atomic - and from the current domain. –Null constraints An attribute may allow or disallow null values. –Key constraints Next slide.

The relational model8 Key constraints Every tupel must have a unique key –SK (Super Key) = set of attributes: t1[SK]  t2[SK] for all tuples in R The set of all attributes is always a super key –All tuples in a relation must be unequal –Key = minimal super key –Candidate key when a relation has more keys. –Primary key: One of the candidate keys.

The relational model9 Relational schema vs. relational state Relational schema –Structure of the database –Created once Relational state –Content of the database (the data) at at given point of time. –Changes as the database is manipulated using insert, update, delete

The relational model10 Integrity Entity integrity –An attribute, that’s part of the primary key, cannot be null. Reference integrity –Relations refer to each other using foreign keys –Referred tuples must exist No “dead” links (unlike the web)

The relational model11 Foreign keys –A foreign key is a set of attributes in a relation R 1 refers to the primary key in [another?] relation R 2 –Same number of attributes Composite primary key  composite foreign key! –Same domains –The referred tupel must exist Or the reference must be null!!

The relational model12 Updating relations insert new tupel. Take care: –primary key must be unique + not null. –referred tuples must exist delete tupel.Take care: –don’t delete a referred tupel refuse deletion update referring tuples update = delete + insert