Databases Flashcards
1
Q
What is an entity?
A
- Category of object, person, event or things of interest about which data needs to be recorded
2
Q
What are attributes?
A
- Characteristics or other information about entities
3
Q
What is a primary key?
A
- A unique identifier for every entity in a database table
4
Q
What is a foreign key?
A
- An attribute in a table which is the primary key in another related table
- This joins the two tables
5
Q
Why are databases normalised?
A
- So that they can be efficient without any compromise to the integrity of their data, ensuring entities contain no redundant or repeated data
6
Q
What is 1NF?
A
- Stands for First Normal Form
- No repeated data within entities
- Data is atomic, each field is unique
7
Q
What is 2NF?
A
- Stands for Second Normal Form
- Must be in 1NF
- Non-key attributes must depend on every part of the primary key
8
Q
What is 3NF?
A
- Stands for Third Normal Form
- Must be in 2NF
- “All non-key attributes depend on the key, the whole key and nothing but the key”