


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A set of lecture notes from cs 180, a database systems course taught by arthur keller during the winter 2002 semester. The notes cover the topics of the relational model, functional dependencies, and the conversion of entity-relationship diagrams to relations. They include examples, explanations, and diagrams to help illustrate the concepts.
Typology: Study notes
1 / 34
This page cannot be seen from the preview
Don't miss anything!



























Winter 2002^
Arthur Keller – CS 180^
-^ Today: Jan. 10 (TH)^ ◆^ Relational Model, Functional Dependencies.^ ◆^ Read Sections 3.1-3.5.•^ Jan. 15 (T)^ ◆^ Normal Forms, Multivalued Dependencies.^ ◆^ Read Sections 3.6-3.7. Assignment 1 due.•^ Jan. 17 (TH)^ ◆^ Relational Algebra.^ ◆^ Read Chapter 5. Project Part 1 due.•^ Jan. 22 (T)^ ◆^ SQL Queries.^ ◆^ Read Sections 6.1-6.2. Assignment 2 due.
Winter 2002^
Arthur Keller – CS 180^
Beers(name, manf) ◆^ Order of attributes is arbitrary, but in practice we need to assume theorder given in the relation schema.• Relation instance^ is current set of rows for a relation schema.• Database schema^ = collection of relation schemas.
name^ manfWinterBrew^ Pete’sBudLite^ A.B.…^ …
Winter 2002^
Arthur Keller – CS 180^ Name^ address^ tel #^5
7
Domain of Arity^ Relation N^ A^ T N1 A1 T1N1 A1 T2N1 A1 T3... N1 A1 T7N1 A2 T1N1 A3 T1N2 A1 T
(^3) Cardinality <=5x3x7of relation Tuple μ Domain
Component Attribute
Winter 2002^
Arthur Keller – CS 180^
Telephone Bob^ 123 Main St
Bob^ 128 Main St
Pat^ 123 Main St
Harry^ 456 Main St
Sally^ 456 Main St
Sally^ 456 Main St
Pat^ 12 State St
Winter 2002^
Arthur Keller – CS 180^
Winter 2002^
Arthur Keller – CS 180^
name^ manf^ Beers
Winter 2002^
Arthur Keller – CS 180^
Winter 2002^
Arthur Keller – CS 180^ Drinkers • For one-one relation
Married, we can choose either^ husband
Likes(drinker, beer)Favorite(drinker,^ or^ wife^ as key.
beer) Married(husband,
wife) name^ manf^ BeersLikes Buddies(name1, name2) name^ addr Buddies Married 1 2 Favorite husband^ wife
Winter 2002^
Arthur Keller – CS 180^
Winter 2002^
Arthur Keller – CS 180^
-^ In^ At,^ hostName
Hosts@@ name^
name
Winter 2002^
Arthur Keller – CS 180^
manfBeers Ales isa color
Winter 2002^
Arthur Keller – CS 180^ OO-Style E/R Style name^ manfBud^ A.B.^ Beers^
name^ manf^ colorSummerBrew^ Pete's^ darkAles name^ manfBud^ A.B.SummerBrew^ Pete's
name^ ColorSummerBrew^ dark Beers^
Ales name^ manf
color Bud^ A.B.
NULL SummerBrew^ Pete's
dark Beers Using NULLS
Winter 2002^
Arthur Keller – CS 180^
favoriteBeer Janeway^ Voyager^
Bud^ A.B.^
WickedAle Janeway^ Voyager^
WickedAle^ Pete's^
WickedAle Spock^ Enterprise
Bud^ A.B.^
Bud
Winter 2002^
Arthur Keller – CS 180^