week 9 Flashcards

1
Q

relational database design

A

grouping of attributes to form a good relation schema

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

Informal guideline 1 : semantics

A

Attributes ( eg Dname , Dno ) in a relation ( eg Department) should refer to one entity - in this case department
. Attributes referring to different entities should not be mixed in a relation
. ONLY foreign key can refer to a different entity

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

Informal guideline 2 : Redundancy

A

Ensure database doesnt suffer from insertion , deletion update anomalies

Hence no redundant data

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

informal guideline 3: Null values

A

Relations in tuples should be designed so they have the fewest null values

If a relation has an attribute that has frequent null values then another relation could be created with primary key of original relation and that attribute

Example: if 10% of employees have individual offices, attribute (OFFICE-NUMBER) should not be included in EMPLOYEE relation. Instead, use separate relation:
EMP_OFFICES (ESSN, OFFICE-NUMBER).

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

informal guideline 4: erronius tuples due to bad joins

if confused:
https://www.youtube.com/watch?v=3kLbvBBNkTw
Title: CS208 PDD Mod 4.1 Database Design Guidelines

A

Design relation schemas that can be joined with equality
conditions on attributes that are either primary keys or
foreign keys in a way that guarantees that no spurious
tuples will be generated.

Avoid relations that contain matching attributes that are
not (foreign key, primary key) combinations, as joining on
such attributes will produce spurious tuples.

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

Functional dependency

A

Functional dependency between attribute X and attribute Y if:
If two tuples have the same value for X , they must have the same value for Y

eg : X- College name , Y is College Rank

X à Y, if whenever two tuples have the same value for X, they must have the
same value for Y
n for any two tuples t1 and t2 in any relation instance r(R): if t1[X]=t2[X], then
t1[Y]=t2[Y]

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