Icons key: For more detailed instructions, see the Getting Started presentation
Creating a Database
Learning objectives
Learn about how databases help us
organize data.
Understand how different fields help us understand and arrange data.
Learn how we can validate and verify
Data – not very useful
without structure is it?
male Brown
30,000 single
A+ 6 High Street
0170 88691 Mr
James
A database gives a
structure to the data and it can now be
processed to give us
information.
Databases can be sorted and searched to make data more useful.
Before computers were around, organizations kept
information on record cards in card boxes, or on sheets of paper in files and filing cabinets.
These days, most databases are created and stored on a computer.
Files
J. Vincent
Address: 6 Broad Lane, Winsford Telephone: 0987 654675
Date of Birth: 02.05.1980
Record Then…
Filing cabinet
Now…
File
Record Computer
Records
Fields
Each record is made up of fields – categories of information.
The fields here are Name, Surname, Address, Telephone and Date of birth.
File
Other data types can include numeric and currency. We need to specify a data type for each field. For
example, Name and Surname are text; Date of birth is not text but a date.
Data Types
text date
Using data types helps to ensure that the data in the record is valid.
This means that if you try and type
text in a date/time data type the
program will not allow it. It will let you put numbers in a text field though.
Mistakes are reduced by making sure the data is valid. However validation would not stop you typing in the wrong date. For that you need to check against the original document. That’s called
verification.
Most database programs allow users to create their own validation checks, such as the following:
character type (number or letter or both) length of field (how many characters, for example a title between 2 and 4 characters) range (specify from and to, for example an exam mark from 0 to 100).
If the data entered isn’t valid, an error message will appear.
A database program is extremely useful for searching the data stored.
When you search, you may want to find a particular
record: for example, search for the record for “J Vincent”. You can search for more than one
record: for example, search for all the
records where the field Surname equals
(=) Vincent.
You can search for records with a
combination of fields: for example,
search for all the records where the field
Surname = Vincent AND the Initial = J
Vincent A Vincent J Vincent S
Vincent J
Sorting is another useful feature of a database.
When you sort you may want to sort by a particular field, for example, sorting by “Surname” would put your list into alphabetical order of Surname.
Smith, James Smith, Amelia Patel, Deepa Lee, Calvin Abbas, Eias Abbas, Eias Lee, Calvin Patel, Deepa Smith, James Smith, Amelia
Get sorted!
You can sort by more than one field, for example you can sort by field “Surname”and then by field “Forename”.
Abbas, Eias Lee, Calvin Patel, Deepa Smith, James Smith, Amelia Abbas, Eias Lee, Calvin Patel, Deepa Smith, Amelia Smith, James
Get sorted!
You can choose which order you would like the sort:
ascending order – starting with the letter A or smallest number and going up
descending order – starting with the letter Z or largest
number and going down.
Abbas, Eias Lee, Calvin Patel, Deepa Smith, Amelia Smith, James Smith, James Smith, Amelia Patel, Deepa Lee, Calvin Abbas, Eias 1 2 3 4 5 5 4 3 2 1 or
Get sorted!
A database is a structured data that is stored in a way that makes it easy to use.
A database is a file.
Each file is made up of records. Each record is made up of fields. Fields have a data type.
Data must be validated and verified to avoid mistakes. A database can be used to search and sort data.
Databases are used by most organizations to store data
and create information.