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 persistentData will still be stored if the computer is turned off, 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 tableContain all the fields and records for one particular collection of entities in a database. structure. A table is a collection of records, with each recordAll of the data relating to one entity in a database. stored as a row. Each record is a collection of information called attributes or fieldAn element of a database record in which one piece of information is stored. For example 'name' in an electronic address book..
The table below has five records. Each record has six attributes. Customer ID is a primary keyThe unique identifying value for records in a database..
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
Customer ID
C0
First name
Alice
Last name
Anderson
Gender
F
Address
13 Monk Way
Town/city
Lisburn
Customer ID
C1
First name
Bob
Last name
Buchannon
Gender
M
Address
14b Iris Street
Town/city
Belfast
Customer ID
C2
First name
Conor
Last name
Crawley
Gender
M
Address
17 Eblana Street
Town/city
Armagh
Customer ID
C3
First name
Davina
Last name
Devlin
Gender
F
Address
53 Fitzwilliam St
Town/city
Newry
Customer ID
C4
First name
Edward
Last name
Ellison
Gender
M
Address
42 Park View
Town/city
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.