Flat File + Relational Databases
A flat file database is simple and contains one table of data. There is data
redundancy (a lot of data is duplicated in the table.
Advantages and disadvantages of fact file databases:
1. Disadvantage: Data redundancy: theres often a lot of duplicate
data in the table. Time is wasted by retyping the same data this
means more data than needs be is stored making the whole
database larger.
2. Disadvantage: when a record is deleted a lot of data that may still
be useful is lost.
3. Disadvantage: Harder to update
4. Advantage: all records are stored in one place
5. Advantage: easy to understand
6. Advantage: Can be sorted out easily
A relational database holds its data over a number of tables instead of
one. Records within the tables are linked (related) to records held in other
tables customer ID and other primary key become foreign keys as they
cross into another table.
Instead the data is stored in several tables with links between the tables to
enable the data in the separate tables to combine together if needed.
ADVANTAGES
Customers (and any other)
details need only be entered into
the database once.
Because of this, mistakes are less
likely to happen and if there were
a mistake in a customer's record,
for example, correcting it will
correct the mistake databasewide.
Duplication is avoided - this keeps
the database's file size down
Details about the item and
customers are easily accessible
using their unique IDs
Queries can be performed and
reports generated (to control
customers.)
DISADVANTAGES
Difficult to change data
Very complicated to setup
E.g. Relation Database
Customer ID
Customer ID
1
2
3
4
Forename
Nicola
Laura
Oil
Theo
Surname
Law
Snow
White
barns
Post code
Quantity in stock
47
8
5
34
Location
Product ID
Product ID
1
2
3
4
Name
Red Vans
Red Keds
Blue Vans
Blue Keds
These were primary keys in their own
file but they are now foreign keys as
they have jumped file.
Sales ID
Sales ID
Customer ID
Product ID