1.3.2 database Flashcards
SQL statements not included here; needs to be revised
relational database
linked tables, each table with record of an entity
flat file
one table
database
organised collection of data
primary key
unique identifier of the entity
foreign key
field that links to a primary key in a second table
secondary key
stored for quick access and query searches
composite key
when 2 unique identifiers are needed to identify the particular record
entity
object, person, event or thing of interest about which data needs to be record
record, attribute
record: row
attribute/field : column
entity relationship modelling
ERM - shows the relationship between entities in a relational database
definition of normalisation
process used to come up with the best possible design for a database
importance of normalisation
- no unnecessary duplication of data
- data integrity
- referential integrity
- small tables→ faster searching and saving storage
- more maintainable
1NF
- no repeating (groups of) ATTRIBUTE
- attributes should be atomic
2NF
- 1NF
- no partial dependencies: information should all be relating to the primary key
3NF
- 2NF
- no non-key dependency: all attributes should be dependent on the key, and nothing but the key