Midterm prep
HW realization:
car is not dependent cause it can exist without office, relationship between office-car is office - 1(particla)-office-N(total)-car → foreign key has to be placed on side of total part
dependent: particla key and primary key of independent;
i don’t think office and car are dependent then
frequest error: don’t confuse total partidipation and dependent entity(double lines)
weak: y, z, k, a→A.a(part of primary key from other but stands after weak entity’s thing)
parts of degree higher than two:
if three dependent relationships connected to one dependent entity: R{a1→A.a1, a2→A.a2, a3→A.a3,Quantity}
relational model - relation(tuple(attributes)),
relational schema: pk under, fk on top of cell
relational mapping:
1 to 1: FK is unique(total) and not null placed on total part side
both part 1 to 1: FK is your decision
both total 1-N: FK on many side, relat attribute on many side
both total: M to M: create a sepratae relationship relation: 2 FK are both part of primary key, relat attribute inside
Multivalued attribute with location as dependent: location as separate: 2 parts of PK
Midterm: all three quizzes
ER diagram
maping - map diagram into relational model
normalization - q3
topics from sql intro)data manipulation, data definition - insert table, delete table, insert table
sql:
change the name of column dcity in orders table to city