1/59
Looks like no tags are added yet.
What are the drawbacks of a file system? There are 6.
data redundancy and inconsisteny, difficulty accessing data, integrity problems, atomicity of updates, concurrent access anomolies, security problems
What is the network database model?
Navigational, any links allowed for quick access
What is the hierarchical database model?
Navifational, links but no cycles
Define the Relational database model
Data independence, data in tables
What is data independence?
Lets used say what data they want, not how to get it
What is physical (internal) data abstraction?
how data is stores, complex low-level data structures and access paths
What is logical (conceptual) data abstractions?
what data is stored and what replationships exist among the data
What is view (external) data abstraction?
the part of the data a user or group cares about
What is the storage manager?
The module between low-level stored data and the application program it queries.
What is query processing?
parsing and translation 2. optimization 3. evaluation
What is a transaction?
a collection of operations that performs a single logical function
What is the transaction-management component?
keeps the database consistent despite system and transaction failures
What is the concurrency-control manager?
controls the interactions among concurrent transactions so the database stays consistent
What is a relation?
A table
What is a tuple?
a rowW
what is an attribute?
a column
What is schema (R)?
the set of attributeswha
What is instance r(R)?
The set of tuples at a given timeW
hat is the domain?
The limited set of values an attribute may take
What are the characteristics of relations?
no inherent ordering of tuples or attributes, all attribute levels are atomic, no duplicate tuplesW
What is a superkey?
any attribute or set of attributes that uniquely identify a tupleW
What is a candidate key (minimal key)?
a superkey where removing any attribute leaves a set that is no longer a superkey
What is a compound key?
a key made of several attributes, removing any one attribute must break uniqueness
What is a primary key?
the one candidate key chosen to identify tuples
What is a foreign key?
The primary key of relation R1 appearing in relation R2
What does σ_condition do?
Select, keeps the rows that satisfy the condition
What does π_attribute list do?
Project, keeps the listed columns
What does R ∪ S do?
Union, shows rows in R or S
What does R ∩ S do?
intersection, shows rows in R and S
What does R - S do?
Difference, rows in R but not in S
What does R x S do?
Cartesian product, every row of R paires with every row of S
What does R ⋈θ S do?
Theta join, cartesian product followed by a select on condition theta
What does R ⋈ S do do?
natural join, equi-join on all attributes with the same name
What does what does ⟕ ⟖ ⟗ do?
outer join, joins that keep unmatched rows, padded with nulls
What does R1/R2 do?
division, values in Ri paired with every row of R2
What does at does ρ do?
Renames a relation or attribute
What is the formula for R1/R2, if R1(Student#, Degree) and R2(Degree)?
R1 / R2 = pi_{student}(R1) - pi_{student}((pi_{student}(R1) R2) - R1)
What are the steps of a division problem?
pair every student with every required degree 2. subtract what they actually have, leaving the disqualified students 3. subtract the disqualified students from all students
Why does a single wide table fail?
incompleteness, query complexity, and wasted storage
What is the design approach?
identify relations and relationships, normalize each relation and relationship
What is a functional dependency?
X → Y, whenever two tuples agree on X, they also agree on Y, a generalization of the notion of a key
What if F+?
the closure of F, the set of all FDs derivable from F using Armstrong’s axoims/
Reflexivity
If Y ⊆ X, then X → Y
Augmentation
If X → Y, then XZ → YZ
Transitivity
If X → Y and Y → Z, then X → Z
Projectivity
If X → YZ, then X → Y and X → Z
Additivity
If X → Y and X → Z, then X → YZ
Pseudotransitivity
If f X → Y and WY → Z, then XW → Z
What is attribute closure?
Attribute closure tests whether X → Y is in F+ without computing F+ and finding candidate keys
What is 1NF?
all domains hold atomic values, no multivalued cells
What is 2nf
1NF and every non-key attribute is fully dependent on the whole primary key
What is 3NF?
2NF and no non-key attribute depends transitively on the key
What is BCNF?
3NF and every attribute depends only on the key
4NF
BCNF and no non-trivial multivalued dependencies
What is the lossless decomposition?
R1 and R2 → R1 or R1 and R2 → R2, a decomposition is lossles sif the common attributes determine all of R1 and R2
What is an example of a lossless decomposition?
R1(sid, degree), R2(degree, program), The common attribute is degree and degree → program so R1 and R2 → R2
What is an example of a lossy decomposition?
R1(side, program), R2(degree, program). The common attribute is program which determines neither side.
What is dependency preservation?
F+ = (F1 or F2)+, a decomposition preserves dependencies if the FDs that hold inside each piece still imply all of F.
How do you build the minimal cover?
Remove transitive dependencies, combine FDs with the same left side, removing extra left-side attributes
What is the 3nf decomposition algorithm?
compute the minimal cover of the FDs
Create one relation Ri per FD in the cover
if not Ri contains the whole key of R, add one more relation holding that key