Normalization & Representing Entities Into Relations Flashcards

1
Q

What is Total Specialization? and how is it represented in an ERD?

A

specifies that each entity instance must be a member of some subtype, and it is represented using double lines connecting the supertype to the circle

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

What is Partial Specialization? and how is it represented in an ERD?

A

specifies that an entity instance is allowed to not be a member of any subtype, and it is represented using a single line connecting the supertype to the circle

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

What is the Disjoint Rule?

A

if an entity instance is a member of one subtype, it cannot be a member of another subtype

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

What is the Overlap Rule?

A

an entity instance can be a member of two or more subtypes

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

How do you represent Binary 1:N Relationships?

A

Add the primary key of the entity that is on the one-side of the relationship as a foreign key to the entity on the many side of the relationship

e.g EMPLOYEE(Name, EmpNo)
DEPENDENT(DepName, DepNo, EmpNo)

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

How do you represent Binary 1:1 Relationships if they can share the same primary key, the entity types are total and do not participate in other relationships

A

Merge the two entities into one entity

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

How do you represent Binary 1:1 Relationships if one of the entities participate in another relationship?

A

Add the primary key of the entity A as a foreign key to entity B

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

How do you represent Binary 1:1 Relationships if the relationship between the entities have an attribute?

A

Any attributes in the relationship will be placed in the entity where the foreign key is placed

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

How do you represent Binary M:N Relationships?

A

Create a new relation, and add the primary keys of both entities to the new relation as foreign keys and combine them to make a composite primary key for the new relation, if the relationship has any attributes, then add them to the new table

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

How do you represent Unary 1:N Relationships?

A

Add a foreign key to the table named with reference to the relationship.

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

How do you represent Unary M:N Relationships?

A

Create a new relation, and add the primary keys of both entities to the new relation as foreign keys and combine them to make a composite primary key for the new relation, if the relationship has any attributes, then add them to the new table.

NOTE: One of the foreign keys must be renamed to something similar

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

What is Normalization?

A

The process of removing inappropriate functional dependencies in a relation

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

Who is the originator of relational models and proposer of the three normal forms.

A

Dr Edgar F. Codd

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

What are repeating groups?

A

they are the presence of a single multivalued attribute or multiple multivalued attributes in a single instance of an entity

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

What is an Unnormalized Form?

A

It is a table that contains one or more repeating groups

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

What are the problems with Unnormalized Form?

A
  • Difficulty in updating
  • Difficult to query multivalued attributes
  • No atomicity
17
Q

What is the First Normal Form?

A

A relation in which the intersection of each row and column has one and only one value.

18
Q

How do you transform an UNF to 1NF

A

we need to identify the repeating groups of the UNF relation and decompose the repeating groups into new relations

19
Q

What is the Second Normal Form?

A

a relation is 2NF if it is already in 1NF and has the follow conditions

  • every non-key attribute is fully functionally dependent on the primary key
  • no non-key attribute exists in the relation
  • the primary key consists of only one attribute
20
Q

What is the Third Normal Form?

A

a relation is in 3NF if it is already in 2NF and has no transitive dependencies

21
Q

How do you transform a relation to 3NF?

A

we decompose the relation by separating the attributes, that caused the transitive dependency to exist, to a new relation