A database is a persistent and organised store of data. Imagine a database storing information about customers for Vicki's Vinyl record store:
|Customer ID||First name||Last name||Gender||Address||Town/City|
|C0||Alice||Anderson||F||13 Monk Way||Lisburn|
|C1||Bob||Buchannon||M||14b Iris Street||Belfast|
|C2||Conor||Crawley||M||17 Eblana Street||Armagh|
|C3||Davina||Devlin||F||53 Fitzwilliam St||Newry|
|C4||Edward||Ellison||M||42 Park View||Enniskillen|
The data has been organised into a table structure with appropriate data types. It is persistent, which means the data will be stored if the computer is turned off or there is power failure.
The simplest databases store data in a single file, where each record is identified as a new line and each row can be separated by a comma. These are known as flat file databases.
However, flat file databases have several undesirable features:
Relational databases can be implemented to help reduce (but not remove) data redundancy, which improves data consistency and integrity.
Relational database design attempts to achieve this by modelling data into appropriate entities and creating relations (links) between the entities.