Tables Flashcards

1
Q

💗💗Integrity Constraints💗💗

💗What is an Integrity Constraint?
💗Domain Constraint?
💗Key Constraint?
💗Entity Integrity Constraint?
💗Referential Integrity Constraint?
💗Table Constraint?
💗Assertions?
A

💗Integrity Constraints - is a condition specified on a database
table and restricts the data that could be stored in the table.

💗Domain Constraint - value in the column must be drawn
from the domain associated with that column.

💗Key Constraint - cannot insert duplicate values into the
primary key.

💗Entity Integrity Constraint - primary key values cannot be
null.
💗Referential Integrity Constraint -

💗Table Constraint - constraints within tables

💗Assertions - constraints between multiple tables

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

What is Normalization (Schema Refunement) ?

A

Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies.

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

2 Properties of decomposition?

A
  • – Loss - less join property
  • – Dependency preserving property

Normal Forms have been proposed to preserve above properties.

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

What is functional dependency?

A

Functional Dependency is a relationship that when one attribute uniquely determine another attribute.

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

😁 Normal Forms?

A

😁 Normal Forms - refers to a series of tests performed on relational schemas to improve their goodness.

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

😁 1st Normal Form?

😁 Steps from UNF to 1NF?

A

😁 1st Normal Form - A relation in 1st normal form, if domains of all attributes in that relation are atomic. (simple & indivisible)

Avoid multivalued & composite attributes.

😁 Steps from UNF to 1NF -

– Remove the outermost repeating group and create a new relation.

– Add to this relation a copy of the PK of the original relation.

– Name the new relation.

– Repeat steps until no more repeating groups.

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

😁 2nd Normal Form?

😁 Steps from 1NF to 2NF?

A

😁 2nd Normal Form - A relation is in 2nd normal form if every non-prime attribute in the relation is not partially dependent on any key of the relation.

😁 Steps from 1NF to 2NF

– Remove the attributes that are only partially functionally dependent on the composite key, and place them in a new relation.

– Add to this relation a copy of the attributes which are the determinants of these offending attributes. These will automatically become the primary key of this new relation.

– Name the new relation.

– Rename the original relation.

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

😁 3rd Normal Form?

😁 Steps from 2NF to 3NF?

A

😁 3rd Normal Form - A relation is in 3rd normal form if the relation is in 2NF and no non-prime attribute is transitively dependent on any key.

😁 Steps from 2NF to 3NF

– Remove the offending attributes that are transitively dependent on the non-key attribute(s), and place them in a new relation.

– Add to this relation a copy of the attributes which are the determinants of these offending attributes. These will automatically become the primary key of this new relation.

– Name the new relation.

– Rename the original relation.

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

Boyce - Codd Normal Form?

A

A relation is in BCNF if every determinant is a super key.

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