Databases Flashcards
What is normalisation
Process where you :
- reduce duplication
- reduce inconsistency
- make it easier to search and sort
Redundant data
Unnecessary repeated data
- leads to data inconsistency
1st normal form
Contains repeating attributes and has a primary key
Relational database
Data is stored in separate tables that are linked through primary and foreign keys
Flat file
All data is stored in one place
- easy to set up
- main problem = redundant data
Primary key
Unique identifyer for a record in a table
Foreign key
Links 2 tables together, exists in one table as a primary key and acts as a foreign key in another
First normal form
No atttribute that contains more then a single value
- each
2nd normal form
Doesn’t have any partial dependencies
No attributes can depend on part of a composite key
3rd normal form
Secondary key
Is made on a field that you would like to be indexed for faster searches
- a table can have more then 1 secondary key