1.3.2 Databases Flashcards
Entity
Item of interest about which information is stored
Relational Database
Contains different tables for each entity
What is a Flat File?
Database that consists of a single file
What are flat files most likely based around?
A single entity and its attributes
How are flat files written out? Describe each part.
__Entity1__(Attribute1, Attribute2, Attribute3…)
What is a primary key?
A unique identifier for each record in a table.
How do we show the primary key?
By underlining it
Foreign Key
An attribute which links two tables together. The foreign key will exist in one table as the primary key, and act as the foreign key in the other.
How do we show the foreign key?
By using an asterisk
Secondary key
Allows a database to be searched quickly
ER Modelling
A visual way of describing data tables and the relationships between them.
They can be used to reduce redundancy and construct a relational database.
What are the three kinds of relationships in ER modelling?
One-to-one (eg Husband —- Wife)
One-to-many (eg Mother —< Children)
Many-to-many (eg Students >–< Courses)
Normalisation
The process of optimally designing data tables by reducing data redundancy and repetition by converting them into normal forms.
Benefits of normalisation [4]
- No redundancy
- Consistent data throughout linked tables
- Records can be added and removed without issues
- Complex queries can be carried out
What are the three types of normalisation?
First Normal Form
Second Normal Form
Third Normal Form