Databases and SQL Flashcards
What is a database?
A database is a computerised store of organised data
What is a Field?
Categories for each piece of data in a table- the columns.
What is a record?
Data for one object person or place- a row
What is a primary key?
A unique identifier for each record
What is the difference between a flat file database and a relational database?
Al flat file database only has one table and a relational database is made up of more than one table. The tables link through the foreign key.
What is a foreign key?
The linking field in a second table which connects the first table to the second .
Why is data redundancy a problem?
Data redundancy means that the same data is repeated, which makes the database much larger than it needs to be.
Why is data inconsistency a problem?
If data is stored multiple times, what if it isn’t always the same?
The more redundant data there is, the more likelihood that errors are introduced and that some of the data will be inconsistent.
Why is a relational database more efficient than a flat-file database?
It is made up of more than one table which removes the problem of data redundancy (repeated data)
Why might the primary key for one table, not be the same primary key in another table?
Each entry only appears once, unique identifier for each set of data
What are examples of places that would use a database?
Schools- stores students information such as age, year group, form group, parents phone numbers etc
Banks- stores information such as passwords/pins, how much money is taken out/put in etc.
Problems of data inconsistency
Duplicated data results in the database being innaccurate and this creates differences in the data stored