Relational Databases Flashcards
What is the definition of a table?
A method for implementing an entity and attributes as a group of related data
What is the definition of an entity?
An object about which data will be stored
What is the definition of an attribute?
A characteristic or piece of information about an entity, which would be stored as a field in a relational database
What is the definition of a primary key?
An attribute in each table that uniquely identifies each record
What is the definition of a foreign key?
An attribute in a table that is a primary key in another table and is used to link tables together
What is the definition of normalisation?
The process of ensuring that a relational database is structured efficiently
What is the definition of a composite key?
Two or more attributes used in combination to key a primary key
What is the definition of a relationship?
The link created between two entities
How is first normal form achieved?
- Ensuring that a table does not contain repeating attributes or groups
- All the data in the table is atomic
How is second norm form achieved?
• Ensuring database is in the 1NF
• Removing attributes that depend upon part of but not all of the primary key
-> by creating additional tables
How is third normal form achieved?
- Ensuring the database is in 2NF
* Removing non-key attributes that depend upon other non-key attributes by creating additional tables
What is the definition of a relation?
A relation is a data structure which consists of a heading and an unordered set of tuples which share the same type
Name three key differences between flat file and relational databases.
- Flat file databases store all data in one table
- Flat file databases are less secure than relational databases
- Flat file databases are more likely to be subject to data redundancy
- Relational databases are more difficult to maintain
What happens when relationships have been created between tables?
The tables become one database
What technique must you use when deciding on how many tables are needed?
Normalisation