SQL tables Flashcards

1
Q

What are table anomalies?

A

anomalies cause problems to the database
causes by poor planning or unnormalized database
-can be avoided with normalization

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

what are Update/modification anomalies?

A

inconsistencies that result from data redundancy or partial update
-incorrect data may be changes

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

what are Insertion anomalies?

A
  • Inability to add data to a database due to missing data
  • issues can happen when adding info to a database
  • avoided by entering correct details- consistent with row values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are deletion anomalies?

A

-unintended loss of data from deleting other data
least likely anomoly to notice or to stop you from proceeding
most costly in terms of recovery

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

What is normalization?

A

normalization removed redundant data
-improved storage and efficiency, data integrity and scalability
normalization splits existing tables, into multiple tables which rejoin each time a query is issued

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

What are the five steps of normalization

A
First normal form
second normal form
third normal form
boyce-codd normal form
forth normal form
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

First normal form must have these 4 qualifications

A

unique attribute name
unique row
single attribute value
no repeating file groups

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

Second normal form must have these 2 qualifications

A
  • Table is in 1NF

- all non-key attributes all fully depend on primary ke

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

Third normal form must have these 2 qualifications

A
  • Table is in 2NF
  • non primary key attributes do not depend on other non primary key attributes
  • transive dependencies are removed and placed in another table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are transive dependencies?

A

Non key, dependent on non key

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

What is a multi values dependency?

A

when two or more independent multi valued facts about the same attribute occur in the same table

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

What is a functional dependency

A

When one keys value is fully dependent on another key

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