


















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































Zeph Grunschlag
HW9 due now HWs 10 and 11 are available
Midterm 2 regrades: bring to my attention Monday 4/
Clerical errors regarding scores can be fixed through reading period
Relational databases standard organizing structure for large databases
Simple design Powerful functionality Allows for efficient algorithms
Not all databases are relational
Ancient database systems XML – tree based data structure Modern database must: easy conversion to relational
1 Kate Winslet Leonardo DiCaprio 2 Dove Dial 3 Purple Green 4 Movie star Movie star
1 Name 2 Favorite Soap 3 Favorite Color 4 Occupation
…etc.
Example of a pigeon to crumb pairing where pigeons may share a crumb: Crumb 1 Pigeon 1 Crumb 2 Pigeon 2 Crumb 3 Pigeon 3 Crumb 4 Crumb 5
The concept of “siblinghood”.
In more rigorous terms, all 4 examples could be represented as subsets of certain Cartesian products.
Q: How is this done for examples 1, 2, 3 and 4?
The 4 examples:
Database
mod 2 addition
Pigeon-Crumb feeding
Siblinghood
A: The subset for mod 2 addition:
{ (0,0,0), (0,1,1), (1,0,1), (1,1,0) }
this terminology, all functions are relations, but not vice versa.
Q: What additional property ensures that a relation is a function?
A: Visualize both branches of solution to
-10 0 10 20 30 40 50 60 70 80 90 100
0
2
4
6
8
10
x
y
L22 19
A: Siblinghood. A = {people} Because relations are just subsets, all the usual set theoretic operations are defined between relations which belong to the same Cartesian product. Q: Suppose we have relations on {1,2} given by R = {(1,1), (2,2)}, S = {(1,1),(1,2)}. Find: