The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)

Slides:



Advertisements
Similar presentations
The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
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.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Thomas Connolly and Carolyn Begg’s
Database Architecture The Relational Database Model.
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
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.
CS370 Spring 2007 CS 370 Database Systems Lecture 7 The Relational model.
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.
1 The Relational Data Model, Relational Constraints, and The Relational Algebra.
Content Resource- Elamsari and Navathe, Fundamentals of Database Management systems.
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.
INTEGRITY. Integrity constraint Integrity constraints are specified on a database schema and are expected to hold on every valid database state of the.
Fundamentals of Relational Database Yong Choi School of Business CSUB, Bakersfield.
Data Integrity An empty database is a correct database.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
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.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
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 University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
SQL LANGUAGE and Relational Data Model TUTORIAL Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
12/2/2015CPSC , CPSC , Lecture 41 Relational Model.
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.
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.
Database Systems Logical Data Modelling Tutor:Ian Perry Tel: Web:
Jennifer Widom Relational Databases The Relational Model.
Chapter 3: Relational Databases
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.
The relational model1 The relational model Mathematical basis for relational databases.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Logical Database Design and Relation Data Model Muhammad Nasir
Chapter 4 The Relational Model Pearson Education © 2009.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints تنبيه.
Relational Model Database Management Systems, 3rd ed., Ramakrishnan and Gehrke, Chapter 3.
CIS 207 The Relational Database Model
Lecture # 13 (After 1st Exam)
Constraints AND Examples
The Relational Database Model
Database.
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Relational Databases The Relational Model.
Relational Databases The Relational Model.
Database Management System
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.
Database Dr. Roueida Mohammed.
Constraints AND Examples
Presentation transcript:

The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file) –Domains –Tuples –Attributes –Relations Relational model constraints…

Domain: –a range of values an attribute can take on Key: –a relation must have a primary key –unique & time-invariant –primary key --> name underlined in the relation schema Entity Integrity –no primary key value can be null Referential Integrity –to maintain consistency among the tuples of two relations… 4 Relational Model Constraints

Referential Integrity - 1 Foreign Key: –a set of attributes FK in relation schema R1 is a foreign key of R1 if it satisfies the following two rules: the attributes in FK have the same domain as the primary key attributes PK of another relation schema R2; the attributes FK are said to reference or refer to the relation R2. a value of FK in a tuple t1 of R1 either occurs as a value of PK for some tuple t2 in R2 or is null. –foreign key can refer to its own relation

Referential Integrity - 2 Referential integrity rule: –If R2 includes a foreign key matching the primary key PK of R1, then every value of FK in R2 must either be equal to the value of PK in some tuple of R1 or be wholly null. R1 and R2 are not necessarily distinct.

Relational Data Retrieval Results of operations: a new relation SELECT: show tuples (rows) PROJECT: show attributes (columns) JOIN: get data from more than one table Set: UNION, INTERSECTION, DIFFERENCE, CARTSIAN PRODUCT

Relational DB Languages Standards: SQL1 (1986),SQL2 (1992), SQL3 (1999) QBE (Query by Example): vary by implementations ACCESS has both QBE and SQL Variations: - Oracle: SQL*,PL/SQL - Sybase: ISQL, T-SQL

A Caution About Basics Note that the database you are creating in the Lab sessions has been designed for you. –This is not a trivial job; it requires an understanding of database principles and theories You will learn simple QBE. Basic SQL is easy; but SQL can be a powerful programming tool which takes time to learn. Everyone can use Access but not everyone can use it correctly.