Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
4.
5.
6.
7.
8. ER Model
a. Entity set: rectangle
i. table with all attributes
b. Attributes: ellipsis
c. Key: underlined
d. Relation diamond
i. table with keys from linked ES and its own attributes
e. Cardinality
i. arrow at most one
ii. regular line unlimited
iii. double line total participation (at least one)
f. Subclasses triangle
i. inherits all attributes of super class
g. Weak entity set double rectangle and double diamond
i. sets without unique keys
ii. gets keys from owner
9. Normalization Theory
a. Lossless join is possible when both table contains a key for one of the tables
10. Join Algorithm and cost models
a. Nested loop join = bR + ceiling(bR/(m-2))*bS
b. Index Join = bR + |R| * (C+J)
i. Create index, For each r in R, index lookup and print matching tuples
ii. R = relation, C = average lookup cost, J = matching tuples in R per S tuple
c. Sort Merge = 2*bR (ceiling(logM-1(bR/M))+1) + 2*bS (ceiling(logM-1(bS/M))+1) + bR
+ bS
d. Hash Join = 2*( bR + bS) * ceiling(logM-1(bR/(M-2)))+( bR + bS)
11. Transactions
a. ACID Atomicity, Consistency, Isolation, Durability
i. 2-phase locking guarantees C,I
ii. logs guarantee A,D