Week 3 Flashcards

1
Q

What does a weak entity set reduce to in the relational schema?

A

A schema that incldues the foreign key column for the primary key of the identifying entity set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is a many to many relationship set represented in a schema?

A

With a schema with attributes for the primary keys of the two participating entity sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are many-to-one and one-to-many relationship sets represented in the schema?

A

By adding a foreign key attribute to the side whose entities can only participate once in the relationship set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What kind of relationship set doesn’t require a schema?

A

An identifying relationship set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are multivalued attributes represented in a schema?

A

By creating a separate relation with each value of the multivalued attribute mapping to a separate tuple in this new schema

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the two approaches for how to deal with generalisation in relational schema?

A

<ul>
<li>Form a schema for the superclass with a foreign key to the superclass in each of the subclass schemas</li>
<li>Form a schema for each lower level set with all inherited attributes</li>
</ul>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the drawbacks of forming a schema for the superclass and having all the subclasses have a foreign key to that?

A

Getting information is harder, requires accessing information about two relations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the drawbacks of having the information stored at each level of the inheritance in the super and sub classes?

A

Data can be stored redundantly if inheritance is not total

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are some problems that can occur if data redundancy is present in the database?

A
<ul>
<li>Insert anamolies</li>
<li>Update anamolies</li>
<li>Delete anamolies</li>
</ul>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe what it means for B to be functionally dependent on A (A->B)

A

If each possible value of A is associated with exactly one value of B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If A->B then what are A and B?

A

A - determinant

B - dependent set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are functional dependencies the property of instead of instances?

A

Schemas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define a trivial functional dependency

A

If the dependent set is a subset of the determinant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define a partial functional dependency

A

If the dependent set is functionally dependent on a strict subset of the determinant

(you can remove an attribute from the determinant and the dependency still exists)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define a full functional dependency

A

If the dependent set is functionally dependent on the determiner but not on any strict subset of determiner

(you can’t remove an attribute from the determinant and the depedenceny will still exist)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do we need to say that C is transivitely dependent on A via B?

A

A->B and B->C (because we have A->C)

17
Q

Define a transitive functional dependency

A

If there is a set of attributes B that is the dependent set in one functional dependency and the determinant in another

18
Q

What is the main purpose of identifying a set of functional dependencies?

A

To specify the set of constraints that hold on a relation, so we can identify candidate keys

19
Q

Define a superkey in terms of functional dependencies

A

K is a superkey for a relational schema R if and only K->R

20
Q

Define a candidate key in terms of functional dependencies

A

K is a candidate key for R if and only if K -> R is a FULL functional dependency (no subset)

21
Q

What is the closure of F?

A

The set of all functional dependecies logically implied by F

22
Q

What is the closure of F denoted by?

A

F+

23
Q

What are the three of Armstrong’s axioms?

A

Reflexivity
Augmentation
Transitivity

24
Q

What is the reflexivity Armstrong axiom?

A

If B is a subset of A, then A -> B

25
Q

What is the augmentation Armstrong axiom?

A

If A->B then cA->cB where cA is any additional set of attributes

26
Q

What is the transitivity Armstrong axiom?

A

If A->B and B->C then A->C

27
Q

What does the Armstrong axioms being sound mean?

A

That they generate only functional dependencies that actually hold

28
Q

What does the Armstrong axioms being complete mean?

A

That they generate all functional dependencies that hold

29
Q

Describe the union closure rule

A

If A->B and A->C then A->BC holds

30
Q

Describe the decomposition closure rule

A

If A->BC holds then A->B and A->C holds

31
Q

Describe the pseudotransitivity rule

A

If A->B holds and cB->d holds then cA->d holds