Section 11 - Databases and Normalisation Flashcards
What is an entity?
A category of object, person, event or thing of interest to a organisation about which data is to be recorded
What does every entity in a database have?
Attributes
What are attributes?
Details of an entity
How are attributes listed?
Inside the brackets
What is a primary key?
A unique identifier for each record in a table
How is a primary key shown?
It is underlined
What are the 3 types of entity/table relationships?
One-to-one
One-to-many
Many-to-many
What is a one-to-one relationship?
Where each entity can only be linked to one other entity
What is a one-to-many relationship?
One table can be associated with many other tables
What is a many-to-many relationship?
One entity can be associated with many other entities, and vice versa
How are one-to-one relationships displayed?
A single line connecting the 2 entities
How are one-to many relationships displayed?
The line will have a branch on one side (the many side)
How are many-to-many relationships displayed?
There will be branches on both sides of the line
What is a relational database?
A collection of tables in which relationships are modelled by shared attributes
What is a foreign key?
A unique identifier that links 2 tables together. In one table the key will exist as the primary key, whilst in another table it will exist as a foreign key