Unit 11 - Databases Flashcards
What is an entity?
An entity is a category of a thing of interest, object, person… where data can be recorded.
What is an entity attribute?
An attribute to an entity, is a property/description of the entity; the entity ‘Customer’ would have attributes such as CustomerID, title, first name, last name…
What is a primary key?
A primary key is an identifier for an entity, uniquely identifying a particular record.
Define a composite key.
A composite key is where two or more attributes are required when defining a record.
Give an example of a composite key.
In a customer order, multiple goods may be purchased and the information on the specific goods purchased is called the ‘order line’.
Therefore to define an order line, there are two primary keys for identification:
Order number and Order line.
Give the three entity relationships.
- One to one
- One to many
- Many to many
What is a foreign key?
A foreign key is an attribute which joins 2 tables together, creating relations between the tables.
What is a relational database?
A relational database is a database where data is organised into tables, known as relations.
What does each row in a relational database hold?
A row in a relational database holds a record.
What does each column in a relational database represent?
A column in a relational database represents an attribute of an entity.
What is normalisation?
Normalisation is the process of designing a relational database, through its 3 forms.
Give the three forms of normalisation.
Normalisation consists of three stages:
- 1NF (1st normal form)
- 2NF (2nd normal form)
- 3NF (3rd normal form)