You are on page 1of 2

Flat Files and Relational Databases

A Flat file is a database which is of limited use and is only suitable for
very simple databases. In flat files, its data redundant which means the
same data is stored more than once in the table.
Advantages:
All records are stored in one place
Easy to understand
Can be sorted easily
Disadvantages:

Harder to update
Harder to change data format
Non unique records
Data redundancy

A relational database when data is not stored in the same table. Instead,
the data is stored in several tables with links between the tables to enable
the data in the separate tables to be combined together if needed using
key fields.
Advantages:

Data is only stored once


Mistakes are less likely to happen
Details about something are easily accessible using their unique ID.

Disadvantages:

Difficult to make changes to the data


Very complicated to set up

Example
Custom
er ID
1

Forena
me
Dave

Bob

Arthur

Surna
me

Product Pname
ID
P1
Badger

Cost

P2

Turnip

50

P3

cow

50p

This is where the customer data is stored.


The data about the
Sales
ID
S1

Custom
er ID
2

Produ
ct ID
P2

S2

P1

S3

P3

products is stored here.

The key fields from both tables are


combined together so that the data is
only entered into the database once.

You might also like