±«Óătv

What is a database?

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.

Where are databases used?

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.

Database concepts

A database is a , organised store of data, meaning it will exist even when the power is off or the system has a failure.

Organisation of data

Data is organised into a structure. A table is a collection of records, with each stored as a row. Each record is a collection of information called attributes or .

The table below has five records. Each record has six attributes. Customer ID is a .

Customer IDFirst nameLast nameGenderAddressTown/city
C0AliceAndersonF13 Monk WayLisburn
C1BobBuchannonM14b Iris StreetBelfast
C2ConorCrawleyM17 Eblana StreetArmagh
C3DavinaDevlinF53 Fitzwilliam StNewry
C4EdwardEllisonM42 Park ViewEnniskillen
Customer IDC0
First nameAlice
Last nameAnderson
GenderF
Address13 Monk Way
Town/cityLisburn
Customer IDC1
First nameBob
Last nameBuchannon
GenderM
Address14b Iris Street
Town/cityBelfast
Customer IDC2
First nameConor
Last nameCrawley
GenderM
Address17 Eblana Street
Town/cityArmagh
Customer IDC3
First nameDavina
Last nameDevlin
GenderF
Address53 Fitzwilliam St
Town/cityNewry
Customer IDC4
First nameEdward
Last nameEllison
GenderM
Address42 Park View
Town/cityEnniskillen

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.