UD CISC 637 - The Rela,onal Model (15 pages)

Previewing pages 1, 2, 3, 4, 5 of 15 page document View the full content.
View Full Document

The Rela,onal Model



Previewing pages 1, 2, 3, 4, 5 of actual document.

View the full content.
View Full Document
View Full Document

The Rela,onal Model

71 views


Pages:
15
School:
University of Delaware
Course:
Cisc 637 - Database Systems

Unformatted text preview:

2 17 11 The Rela onal Model CISC437 637 Lecture 4 Ben Cartere e Copyright Ben Cartere e 1 Rela onal Model The rela onal model is the most widely used in modern DBMS IBM s DB2 Informix Oracle Sybase MicrosoN Access and SQL Server MySQL PostgreSQL Introduced by Edgar Codd in 1970 Di erences from ER model Only one structure rela ons rather than two en es and rela onships Logical rather than conceptual Based on mathema cal framework that formally describes queries of rela ons Copyright Ben Cartere e 2 1 2 17 11 Rela ons Rela ons are the main construct in the rela onal model Two components Rela on instance is a table with rows and columns A rela on schema describes the columns of the table Copyright Ben Cartere e 3 Rela on Schema The schema de nes a rela on in terms of The rela on name The name of each column or eld The domain of each eld Example Students sid integer name string login string age integer gpa real Copyright Ben Cartere e 4 2 2 17 11 Rela on Instance An instance of a rela on is a set of records or tuples Each record has the same elds as de ned in the schema Rela on instance rela on table Every record in a table is unique No two records can have every eld value equivalent Strictly speaking no ordering on records or elds In prac ce ordering elds is oNen useful Copyright Ben Cartere e 5 Domain Constraints The domains of the elds specify condi ons that a rela on must sa sfy A record is valid only if its values are in the speci ed domains or NULL More formally R f1 D1 fn Dn is a rela on schema Di is a name for a set of values Domi f1 d1 fn dn d1 Dom1 dn Domn is a valid rela on instance of R Any record f1 d1 fn dn for which there is some i such that di Domi is invalid Copyright Ben Cartere e 6 3 2 17 11 A Few More De ni ons The degree or arity of a rela on is the number of elds columns The cardinality of a rela on instance is the number of tuples records in it Copyright Ben Cartere e 7 Rela onal Databases A rela onal database is a collec on of rela ons with



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view The Rela,onal Model and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The Rela,onal Model and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?