Creating A Database
description
Transcript of Creating A Database
CREATING A DATABASEMr ContiYear 10 – ComputingLesson 5
Learning ObjectivesBy the end of this lesson we will have learned:
• How databases help us to organise data.
• How different fields help us to understand and arrange data.
• How we can validate and verify data to avoid making errors.
What is a Database?• Think – Think about the answer to the question
• Pair – Discuss it with you neighbour
• Share – Share your answer with the class
What is a Database?Data is unprocessed information. This information can take many different forms.
maleBeck 30,000
single
A-
6 Western Road
01864 830002
Mr Adam
A database gives structure to the data so that it can be processed to give us information.
However, without a structure for the data to be kept in, it is meaningless.
Databases can be sorted and searched to help us find relevant and useful information.
Title:Forename:Surname:Gender:Address:Blood type:Marital status:Telephone:
MrAdamBeckmale6 Western RoadA-single01864 830002
For the recordBefore computers were invented, organizations kept information on record cards in card boxes, or on sheets of paper in files and filing cabinets.
J. Vincent
Address: 6 Broad Lane, Winsford
Telephone: 0987 654675
Date of Birth: 02.05.1980
Files RecordFiling cabinet
Much more convenient
File
Record
Computer
Now, databases are created and stored on a computer.
A closer look
Inside the fieldsEach record is made up of fields – categories of information.
The fields that are listed in this database are:
Name Telephone
Address
Surname Date of Birth
Task Time• Pupil Resources• ICT• Mr Conti• Year 10• L5• Task 1
• 10 Minutes
Answers
Let’s get it right
Other data types can include currency, time and fractions.
We need to specify a data type for each field.
Name, Surname and Address are text fields.
Date of Birth is a date field.
Telephone number is a text field rather than a number field, so that the 0 at the start is not ignored.
Task Time• Pupil Resources• ICT• Mr Conti• Year 10• L5• Task 2
• 15 Minutes
Reducing mistakesUsing data types helps to ensure that the data entered in the record is valid.
If you try to type text in a date/time data field, the program will not allow it.
Validation does not stop you typing in the wrong date. For that you need to check against the original document. This is called verification.
Mistakes are reduced by making sure the data is valid.
However, it will let you put numbers in a text field.
Checking for errorsMost database programs allow users to create their own validation checks, by setting the rules or limits for certain fields, such as:
character type (number or letter or both)
If the data that is entered is not valid, an error message will appear on the screen to inform you.
range (specify from and to, for example an exam mark from 0 to 100).
length of field (how many characters, for example a title between 2 and 4 characters)
PlenaryI understand how databases help to organize data.
I understand how different fields help us to understand and arrange data.
I know how to validate and verify data to avoid making errors.