7/8 Relational Design Flashcards

(41 cards)

1
Q

What is the first step in designing a database?

A

Common sense and intuition of DB designer

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

What does an ER schema represent?

A

Entity-Relationship diagram showing entities, their attributes, and relationships

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

What must an ER diagram be transformed into?

A

Tables with rows and columns

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

Is there a final rule for perfect attribute grouping?

A

No final rule for perfect attribute grouping

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

What are the two levels of theory to improve relational schema?

A
  • Logical level
  • Storage level
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Functional Dependency (FD)?

A

Relationship between two sets of attributes in a table

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

What does a functional dependency tell us?

A

If we know the value of one attribute, we can uniquely determine the value of another attribute

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

Provide an example of a functional dependency.

A

SSN determines Name

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

What is a super key?

A

Set of attributes in a relation that uniquely identifies each tuple

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

What does the functional dependency X → Y imply?

A

If two rows have the same values for attributes in X, they must also have the same values for attributes in Y

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

What is a candidate key?

A

A super key with no subset Y of K such that Y → U

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

What ensures that data in a relation follows certain rules?

A

Specifying Functional Dependencies (FD’s)

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

What makes a functional dependency trivial?

A

The right hand side is already included in the left hand side

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

What symbol is used for a logically implied FD?

A

|=

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

What does F+ represent?

A

The set of functional dependencies logically implied by F

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

What is Armstrong’s Reflexivity Rule?

A

If X ⊆ Y, then Y → X

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

What is the Augmentation Rule in functional dependencies?

A

If X → Y and Z is a set of attributes then XZ → YZ

18
Q

What does the Union Rule state?

A

If X → Y and X → Z then X → YZ

19
Q

What is a minimal cover set denoted by?

20
Q

What are the criteria for a set of FDs to be minimal?

A
  • Each FD has one attribute on the right
  • No FD can be removed without changing the meaning
  • No attribute on the left side is unnecessary
21
Q

How can you determine if AG is a super key?

A

If AG+ contains all attributes in the relation

22
Q

What is the closure of an attribute set?

A

All the attributes that can be figured out from attribute (X) given the set of FDs

23
Q

What does it mean if X+ includes all attributes?

A

X is a super key

24
Q

What is the difference between a super key and a key?

A

A key is the smallest possible super key

25
What problems can arise from representing, updating, adding, or deleting facts in a database?
Redundancy and anomalies ## Footnote Redundancy refers to waste of space, while anomalies include update inconsistency, insertion issues, and deletion losses.
26
What is redundancy in the context of databases?
Waste of space
27
What types of anomalies can occur in databases?
* Update anomaly: potential inconsistency * Insertion anomaly: inability to add data due to missing other required data * Deletion anomaly: loss of other useful data when deleting something
28
What is normalization in database design?
The process of breaking a large table into smaller ones (decomposition) to reduce anomalies and redundancy
29
What is lossy decomposition?
A decomposition where the original table cannot be reconstructed after joining, leading to extra, incorrect data
30
What is lossless-join decomposition?
A split where the original table can be recovered through a join without adding or losing any data
31
What condition must hold for a decomposition to be lossless-join?
(R1 ∩ R2 → R1) or (R1 ∩ R2 → R2) is in F+
32
What is the significance of preserving functional dependencies in decomposition?
Ensures that the constraints or rules of the original dataset are still represented in the decomposed relations
33
What is a prime attribute?
An attribute that is part of a candidate key for a relation
34
What is the First Normal Form (1NF)?
A relation is in 1NF if all attributes have atomic domains (indivisible values)
35
What does Non-First Normal Form (N1NF) indicate?
The relation has attributes that hold nested relations
36
What is the criteria for a relation schema to be in Second Normal Form (2NF)?
It must be in 1NF and all non-prime attributes depend on the whole candidate key
37
What characterizes a relation schema in Third Normal Form (3NF)?
For every functional dependency X → A, either X is a superkey or A is a prime attribute
38
What is a transitive dependency?
An indirect dependency where Attribute A depends on B and B depends on C
39
What is Boyce-Codd Normal Form (BCNF)?
A stricter normal form where for every functional dependency, the determinant must be a superkey
40
In what order do normal forms relate to each other?
* BCNF is stricter than 3NF * 3NF is stricter than 2NF * 2NF is stricter than 1NF
41
What is the goal in Relational Database Design?
* Achieve Boyce-Codd Normal Form * Ensure Lossless Join * Preserve Dependencies