1.3.2 Databases Flashcards
(a) Relational database, flat file, primary key, foreign key, secondary key, entity relationship modelling, normalisation and indexing. See appendix 5f. (b) Methods of capturing, selecting, managing and exchanging data. (c) Normalisation to 3NF. (d) SQL – Interpret and modify. See appendix 5d. (e) Referential integrity. (f) Transaction processing, ACID (Atomicity, Consistency, Isolation, Durability), record locking and redundancy.
What is a primary key?
A field which has a unique value for every record.
What is a entity?
An entity is a category of data to be recorded in a database, entities have attributes.
What is a flat file database?
A database that consists of a single file.
What is an attribute?
The data attached to an entity. For example the entity Dentist might have the attribute name.
Write the entity description format out.
Entity (Attribute1, Attribute2)
What is the need for a secondary key?
A secondary key is indexed allowing for faster
searching.
How can an entity relationship be modeled?
|Entity|(One/Many)—-(Name of the relationship)—(One/Many)|Entity|
What are the three degrees of relationships in a relational database?
One to one, One to many, Many to many.
How does a relational database work?
In a relational database a separate table is created for each entity identified, where a relationship exists between entities an extra field is added to the tables to link them.
What is a foreign key?
An attribute that creates a join between two tables and will be the primary key of one of the tables and the foreign in the other.
What needs to be done in the case of a many to many relationship?
An extra table is needed in order to link both tables consisting of foreign keys.
What is a composite key?
A primary key that consists of more than one attribute.
What is an issue likely to arise when using a flat file structure?
Redundant data and data inconsistencies.