Databases & SQL Flashcards
Define the term ‘Database’.
Database - A computerised system that makes it easy to search for, select and store information. Often used in places such as banks, schools, businesses, etc.
Define ‘field’ and ‘record’.
Field - Categories for each piece of data in a table (Columns)
Records - Data for an object, person or place. (Rows)
Define and Compare a ‘Primary Key’ and ‘Foreign key’.
A primary key is a unique identifier for records specific to that table whereas a foreign key is that but for another table that has been linked via it (linking field in the foreign table formed when making a relationship between them - becomes the primary key of the new table, by default).
Describe a ‘flat-file Database’ and its problems.
Flat-file Database - Made up of only 1 table for everything which leads to problems such as data redundancy and data inconsistency.
Data Redundancy - Repeated data in a table, making the file unnecessarily large.
Data Inconsistency - If data is stored multiple times however it isn’t always the same, meaning the chance of errors occurring and data being inconsistent (hence the name) is higher
What is a ‘Relational Database’?
Relational Database - Made up of more than 1 table, eliminating the problems of data redundancy/inconsistency; recognises relations between different tables
What does SQL stand for?
Structured Query Language - Used to communicate/edited with databases