0% found this document useful (0 votes)
25 views17 pages

Introduction To Databases

Uploaded by

jianjinan2010
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views17 pages

Introduction To Databases

Uploaded by

jianjinan2010
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Introduction to Databases

Software

Icons key: For more detailed instructions, see the Getting Started presentation

Flash activity. These activities are not editable. Teacher’s notes included in the Notes Page

Web addresses

1 of 17 © Boardworks Ltd 2008


Learning objectives

Understand what a database is and how it works.


Understand the purpose of data validation and
the procedures involved.
Be able to name organizations that use
databases and the reasons why they do so.

2 of 17 © Boardworks Ltd 2008


What does it do?

3 of 17 © Boardworks Ltd 2008


What are its basic features?

4 of 17 © Boardworks Ltd 2008


Database properties

Some databases also allow the


user to create an image field. This
can be very useful in a student file,
for example, as it allows a photo of
each student to be added to their
record.
Another type of field is a calculated field. This usually
contains a calculation based on numbers in other fields.

This field
is calculated
from the
date of birth

5 of 17 © Boardworks Ltd 2008


Primary key

It is usually a good idea to have a primary key field – a


field which is different for every record. In this database,
the Boarder ID is the primary key field.

The database can automatically give


each new record a number by setting
the field type to AutoNumber.

This helps to identify each record,


because there can be no two
records with an identical key field.

6 of 17 © Boardworks Ltd 2008


Can I have a go?

7 of 17 © Boardworks Ltd 2008


What else can it do?

Validation is where the database looks for mistakes in data


being entered.

The database checks the data against the validation rules,


and if the data is not valid, it gives the user an error
message. Validation cannot prevent all data entry
mistakes, but it can find some.

8 of 17 © Boardworks Ltd 2008


Validation

In our database, one way we could validate the ‘Date of


Birth’ field is to make it only accept dates after 1910.
We could validate the Number of GCSE Passes field
to be less than 20.
That wouldn’t stop us entering Jerome’s passes as 1
instead of 7, because 1 and 7 would both be valid.
To find that mistake, we would have to verify the data
by checking it against the source.

9 of 17 © Boardworks Ltd 2008


Types of validation

Format check – e.g. two letters followed by two numbers


– PR15 would be valid but PRX71 would not.
Presence check – checking that the field contains any data.
Range check –checking that the data is between certain
numbers or letters, e.g. A–E.
Lookup check – checking that only values from a set list
can be entered, e.g. M or F.
Size check – checking data falls within a minimum or
maximum number of characters.

10 of 17 © Boardworks Ltd 2008


Error messages

If data is entered and it breaks the validation rules, the


database can give an error message to explain what
is wrong.

It is best if error messages are written in plain language to


help the user understand what is wrong. For instance, if a
field can only contain the data ‘M’ or ‘F’, the message:

Entry not valid

is not nearly as helpful as:

Please enter M or F

11 of 17 © Boardworks Ltd 2008


Test your validation skills

12 of 17 © Boardworks Ltd 2008


What are they used for?

Databases are used in many organizations to store


information, for example:

Schools Banks Directory enquiries


store information store information store telephone
about pupils. about customers. numbers.

Police Shops
store information store information
on criminals and cases. about products they sell.
13 of 17 © Boardworks Ltd 2008
Forms and reports

Forms are designed to be viewed on-screen. They make it


easier for users to enter data into a database.

Reports are designed to be printed.

14 of 17 © Boardworks Ltd 2008


Why use databases?

Databases are used because:

Data can quickly be sorted into order.

It is quick to search for information, and you can search


any field.

You can even use a wildcard search if you only know part
of the record. For instance, if you are looking for a
person’s name, and you know the name begins with
Black, a wildcard search for Black* would return
Blackham and Blackstock as well as Black.

15 of 17 © Boardworks Ltd 2008


Databases searches

Database searches are normally known as queries. Many


databases systems allow you to use the terms
AND, OR and NOT.

For example searching for “Peter NOT Pete” would return all
records named ‘Peter’ but removed those named ‘Pete’.

Searching for “Peter OR Pete” would return all


records named either Peter or Pete

Searching for “Forename=‘Peter’ AND Surname=‘Parker’”


would return only the records for persons named Peter Parker.

16 of 17 © Boardworks Ltd 2008


Summary

Databases are used to store data.


A database file is made up of records.
A record holds all the data for one person or thing.
Records are made up of fields.
Fields can be text, number, date, time, currency or logical.
Validation checks data entered for mistakes.
Databases can search for data that matches certain criteria.
They can sort data into ascending or descending order.
Forms and reports make it easier for the user to view the
information they need.
Forms are viewed on-screen; reports are printed.

17 of 17 © Boardworks Ltd 2008

You might also like