Databases Flashcards
What is a relational database?
A database which recognises the difference between entities by using
different tables for each entity.
Define attributes
Characteristics of an entity
Define flat file
A database where a single table data structure is used to store all the data.
Define primary key
A unique identifier, which identifies each record in a table.
How is the primary key shown?
By underlining it.
Define foreign key
A linking attribute that joins two tables in a relational database, by being a primary key in one and a foreign key in another.
How is the foreign key shown?
Using an asterisk.
Define secondary key
A key that can be used as an alternative index to access or sort records in the table in a quicker, but less accurate than the primary key.
What is the entity-relationship modelling method?
How can it be used?
A method of abstractly describing the data tables and the relationships between them visually.
It can be used to reduce redundancy and construct a relational database.
ER: One-to-one
Each entity can only be linked to one other entity.
EG: Husband and Wife
ER: One-to-many
One table can be assosciated with many other tables.
EG: Mother and Multiple Children
ER: Many-to-many
One entity can be assosciated with many other entities, and the same applies the other way around.
EG: Students and courses.
Define normalisation
The formal process of optimally designing data tables by reducing data redundancy and repetition by converting them into normal forms.
What does normalisation try to accomplish?
- No redundancy (unnecessary duplicates)
- Consistent data throughout linked tables
- Records can be added and removed without isues.
- Complex queries can be carried out
First Normal Form (1NF)
A table with no repeating attributes. The intersection of each record and attribute produces exactly one value.