Database Basics
ACID
- Atomicity
All or nothing - each atomic transaction either succeeds or fails as a whole.
- Consistency
only valid data is written to the database.
- Isolation
separate, uncommitted transactions do not interfere with each other.
- Durability
data written to the database will not be lost and can be recovered in the event of a failure.
Normalisation
- 1st Normal Form
- group data into tables
- remove repeating groups
- assign a primary key (PK)
- 2nd Normal Form
- create tables for data that applies to multiple records
- relate tables via a Foreign Key (FK)
- 3rd Normal Form
- eliminate data that does not rely on Primary Key