Databases Flashcards

(8 cards)

1
Q

List

Types of Database Integrity

A
  • Domain
  • Relational
  • Entity

(DRE)

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

Define

Domain Integrity

A

Values in a column must be valid and match type & format

e.g. text must go in a TEXT column

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

Define

Referential Integrity

A

Foreign keys must point to a valid primary key.

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

Define

Entity Integrity

A

Every row has a primary key that is unique

(Unique entity)

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

List

Types of Data Anomalies

A
  • Update
  • Insert
  • Delete

(UID)

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

Define

Update Anomaly

A

Updating data stored in multiple locations that aren’t linked together

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

Insert Anomaly

A

When new data can’t be added due to its relationship with other data

(e.g. a db with a student id and course id, a new student id can’t be added without having a null course id)

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

Delete Anomaly

A

When deleting one piece of data leads to the deletion of another piece of data

(e.g. car rego database, where a person is deleted and their only car is deleted as a result)

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