A database is a collection of data organised in a way that makes it easy for a computer program to search and store information. You can think of it like an electronic filing system.
Databases are used in many different settings, for different purposes. A social network will use a database to store information about you, your friends, places you have visited or posts you have liked. Libraries will use databases to keep track of which books are available and which are out on loan.
A database is a persistent, organised store of data, meaning it will exist even when the power is off or the system has a failure.
The table below has five records. Each record has six attributes. Customer ID is a primary key.
|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|
Each record must be uniquely identified in order to access individual record details. A primary key is a unique value used to identify each record in a database. This could be a Customer ID in a shop database or a patient ID in a doctor's surgery.