Databases - Introduction Flashcards
1
Q
What is a Flatfile DB?
A
A database that consists of only one table.
2
Q
What are the issues with Flat file DBs?
A
In larger databases they cause problems such as:
- repeating data
- increased file sizes
- insert-update-delete anomalies
3
Q
Name and describe the three anomalies
A
- INSERT - inability to insert data to the database due to the absence of other data.
- UPDATE - the same data is repeated in multiple rows, and changes are made in some but not all instances.
- DELETE - inability to delete data from the table without having to delete the whole record.
4
Q
How can we avoid anomalies?
A
By designing relational DBs that use two or more linked tables to store data.
5
Q
Name the 5 field types
A
- TEXT - including numbers starting with a zero and punctuation
- NUMBER - decimals included
- DATE
- TIME
- BOOLEAN - yes or no , true or false, etc.
BOB NEVER TWO TIMES DATES
6
Q
What is a primary key?
A
A field that is used to uniquely identify every record in a database
7
Q
What is a foreign key?
A
Primary key from one table that appears in another table to link the two together.
8
Q
What is a field?
A
Smallest unit of storage in a database
9
Q
What is a record?
A
Column of values, usually belonging to a particular field.