What is an Entity in a database?
An item of interest about which information is stored.
What is a Relational Database?
A database that organizes data into tables, recognizing differences between entities.
What is a Flat File database?
A database that consists of a single file, typically based around a single entity.
How is a flat file typically described?
Entity(Attribute1, Attribute2, Attribute3…)
What is a Primary Key?
A unique identifier for each record in a table.
How is a Primary Key indicated in notation?
By underlining the attribute.
What is a Foreign Key?
An attribute in one table that is the primary key in another, used to link tables.
How is a Foreign Key indicated in notation?
Using an asterisk (*).
What is a Secondary Key?
An attribute used to speed up searching and ordering, but is not unique.
Why are Secondary Keys useful?
They allow searching on attributes users are likely to know (e.g., surname) rather than a primary key.
What are the three types of relationships in Entity Relationship Modelling?
One-to-one, One-to-many, Many-to-many.
What is a One-to-one relationship?
Each entity is linked to only one other entity (e.g., husband and wife).
What is a One-to-many relationship?
One entity can be linked to many others (e.g., a mother and her children).
What is a Many-to-many relationship?
One entity can be linked to many others, and vice versa (e.g., students and courses).
How is a One-to-one relationship shown in a diagram?
With a single line connecting the entities.
How is a One-to-many relationship shown?
With a single line and a crow’s foot (branch) on the ‘many’ side.
How is a Many-to-many relationship shown?
With a crow’s foot (branch) on both sides.
What is Normalisation?
The process of designing a database to reduce redundancy and improve data integrity.
What are the goals of Normalisation?
No redundancy, consistent data, easy record addition/removal, support for complex queries.
What are the three normal forms?
First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF).
What is required for a table to be in First Normal Form (1NF)?
No attribute can contain more than a single value.
What is required for a table to be in Second Normal Form (2NF)?
It must be in 1NF and have no partial dependencies (no attribute depends on only part of a composite key).
What is required for a table to be in Third Normal Form (3NF)?
It must be in 2NF and have no non-key dependencies (attributes depend only on the primary key).
What is Indexing?
A method to store the position of records ordered by an attribute for fast data access.