1.3.2 - Databases Flashcards
What is an entity?
An entity is an item of interest about which information is stored
What is a relational database?
A relational database is a database which recognises the differences between entities by creating different tables for each entity.
What is a flat file?
A flat file is a database that consists of a single file. The flat file will most likely be based around a single entity and its attributes.
What is a primary key?
A primary key is a unique identifier for each record in the table.
What is a foreign key?
A foreign key is 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 another.
What is a secondary key?
A secondary key allows a database to be searched quickly. It can be allocated to a value which is likely to be specific to a user, e.g surname.
What is one to one entity relationship modelling?
Each entity can only be linked to one other entity, such as the relationship between a husband and wife.
What is one to many entity relationship modelling?
One table can be associated with many other tables, such as a mother having multiple children
What is many to many entity relationship modelling?
One entity can be associated with many other entities and the same applies the other way round. An example is students and courses.
What is normalisation?
Normalisation is the process of coming up with the best possible layout for a relational database
What does normalisation try to accomplish?
No redundancy (unnecessary duplicates).
Consistent data throughout linked tables.
Records can be added and removed without issues.
Complex queries can be carried out.
What is the first normal form?
There must be no attribute that contains more than a single value.
What is the second normal form?
A database which doesn’t have any partial dependencies and is in first normal form can be
said to be in second normal form.
This means that no attributes can depend on part of a composite key.
What is the third normal form?
If the database is in second normal form and contains no non-key dependencies, it is in third normal form.
A non-key dependency means the attribute only depends on the value of the primary key and nothing else.
What is indexing?
Indexing is a method used to store the position of each record ordered by a certain attribute. This is used to look up and access data quickly. Secondary keys are normally indexed, because the primary key is not normally remembered.