algebracalculus - The Relational Model - theoretical...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Database Group, Georgia Tech © Leo Mark 1 Relational Model The Relational Model - theoretical foundation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Database Group, Georgia Tech © Leo Mark 2 Relational Model The Relational Model data structures constraints operations algebra (ISBL) tuple calculus (QUEL, SQL) domain calculus (QBE) views
Background image of page 2
Database Group, Georgia Tech © Leo Mark 3 Relational Model Data Structures let D 1 , D 2 , D 3 , . .., D n be sets (not necessarily distinct) of atomic values relation, R , defined over D 1 , D 2 , D 3 , . .., D n is a subset of the set of ordered n- tuples {<d 1 , d 2 , d 3 , . .., d n | d i D i , i=1, . ..,n}; D 1 , D 2 , D 3 , . .., D n are called domains the number, n , is the degree of the relation (unary, binary, ternary, n-ary). the number of tuples, |R| , in R is called the cardinality of R if D 1 , D 2 , D 3 , . .., D n are finite then there are 2 | D1 | × | D2 | × ... × | Dn | possible relation states
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Database Group, Georgia Tech © Leo Mark 4 Relational Model Data Structures an attribute name refers to a position in a tuple by name rather than position an attribute name indicate the role of a domain in a relation attribute names must be unique within relations by using attribute names we can forget the ordering of field values in tuples a relation definition includes the following R( A 1 :D 1 , A 2 :D 2 , ..., A n :D n )
Background image of page 4
Database Group, Georgia Tech © Leo Mark 5 Relational Model Constraints keys primary keys entity integrity referential integrity RESERVATION FLT# DATE CUST# FLT-SCHEDULE FLT# CUSTOMER CUST# CUST-NAME p p
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Database Group, Georgia Tech © Leo Mark 6 Relational Model CUSTOMER cust# first middle last phone# street city state zip RESERVATION flt# date cust# seat# check-in-status ticket# AIRPORT airportcode name city state FLT-SCHEDULE flt# airline dtime from-airportcode atime to-airportcode miles price FLT-WEEKDAY flt# weekday AIRPLANE plane# plane-type total-#seats FLT-INSTANCE flt# date plane# #avail-seats
Background image of page 6
Database Group, Georgia Tech © Leo Mark 7 Relational Model Operations classes of relational DMLs: relational algebra (ISBL) tuple calculus (QUEL, SQL) domain calculus (QBE) a relational DML with the same “retrieval power” as the relational algebra is said to be relationally complete all relational DMLs have syntax for: change (insert, delete, update) queries (retrieval)
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Database Group, Georgia Tech © Leo Mark 8 Relational Model Operations - insert, delete, update constructs for insertion are very primitive: INSERT INTO FLT-SCHEDULE VALUES (“DL212”, “DELTA”, 11-15-00, “ATL”, 13-05-00, ”CHI”, 650, 00351.00); INSERT INTO FLT-SCHEDULE VALUES (FLT#:“DL212”, AIRLINE:“DELTA”); FLT-SCHEDULE flt# airline dtime from-airportcode atime to-airportcode miles price
Background image of page 8
Database Group, Georgia Tech © Leo Mark 9 Relational Model Operations - insert, delete, update insert into FLT-INSTANCE all flights
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/12/2011 for the course MAT 1117 MAT 117 taught by Professor White during the Spring '09 term at University of Phoenix.

Page1 / 45

algebracalculus - The Relational Model - theoretical...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online