Lecture 2 - Relational Schema Good Or Bad Flashcards

1
Q

What performance metrics may we look at when judging the goodness of a relational schema?

A
  • goodness i.e. whether the attributes form a good relation
  • what pitfalls exist
  • operation efficiency
  • maximize amount of information conveyed while minimizing redundancy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Guidelines for good design of a relational schema?

A
  1. attributes of a relation should make sense
  2. avoid redundant tuples
  3. relations should minimize the amount of null values held
  4. design relations to avoid fictitious tuples after join
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain what is meant by the first guideline : The attributes of a relation should make sense.

A

Attributes of different entities should not be in the same relation, as to minimize the similarity between relations. Relationships should on be represented by Primary and Foreign keys.

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

What is the impact of guideline 2: Avoid redundant tuples?

A

Having repetition of data:
- wastes storage space
- leads to inconsistencies (as replicas must be changed when one tuple is changed) and anomalies

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

Why have NULL values in tuples?

A
  • to represent inapplicable or invalid attribute for that tuple
  • value is unknown
  • value is known, but unavailable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What should we do to meet guideline 3?

A

Attributes that are frequently NULL should be placed in
separate relations to avoid wasting storage & reducing uncertainty!

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

What is guideline 4 : Design relations to avoid fictitious tuples after join.

A

Splitting a relation on the wrong attribute, means after we try to combine we may get non-existing entries!

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