Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATABASES Surname: Brown Forename: James Form: 7B

Similar presentations


Presentation on theme: "DATABASES Surname: Brown Forename: James Form: 7B"— Presentation transcript:

1 DATABASES Surname: Brown Forename: James Form: 7B
Date of Birth: Telephone:

2 What is a database? A database is a collection of information.
You can have a very large one such as an encyclopaedia on a CD-ROM, or a much smaller one that you create yourself.

3 Uses of databases Library catalogues Football player statistics
Argos catalogue shopping School pupil records Address book What could you use a database for? Try to think of at least two ideas.

4 File Structure So that we can find information in a file, we need to have some kind of structure. The diagram shows how the various parts of a file go together in a simple structure. Surname: Brown Forename: James Form: 7B Date of Birth: Telephone: One record for each Year 7 pupil Five fields in the record

5 File Structure cont.…. Each record is made up of a set of fields.
The diagram shows how a file is made up of a collection of records. Each record is made up of a set of fields. One record for each Year 7 pupil Surname: Brown Forename: James Form: 7B Date of Birth: Telephone: Five fields in the record

6 The data base program is called:
Microsoft Access

7 File Structure cont.….. In the example, Surname, Forename, Form, and Date of Birth are four of the fields in each record. There would be one record holding this information for each pupil in Year 9. Brown James 7B Telephone: One record for each Year 7 pupil Five fields in the record Surname: Forename: Form: Date of Birth:

8 Field Type When you set up the fields you can say what type of data the field will hold. The field type is important when you sort the data into order. Here are some common field types: TEXT NUMBER DATES

9 Text ABC A text field will hold any mixture of numbers and letters.
Names are text and so are addresses, even though the first line starts with a number. Sorting a text field will be done using the rules for alphabetical order.

10 Number (sometimes called numeric):
This field type only holds numbers, you need to think about this carefully in some cases. For example, in the case of telephone numbers, although we refer to them as phone numbers we do not store them as numbers, or treat them as numbers. (If someone asks your phone number you say SIX, THREE, SEVEN, EIGHT, FIVE, not sixty-three thousand, seven hundred and eighty-five.) Telephone numbers, especially long ones with dial codes, should be stored as text.

11 Dates 25 December 25/12/2002 31/3/48, 1/4/97, 12/12/96, 11/12/96.
If you want to sort information by a date like date of birth, you need to store it as a date field. Dates need to be sorted in a special way. Think about how you would sort these dates into date order: 31/3/48, 1/4/97, 12/12/96, 11/12/96. Which part of the date did you look at first? If they were normal numbers, which part would you look at first?

12 Accuracy CHECK YOUR DATA
Computers are very accurate and this is why we use them for storing information. Humans are not always accurate and this can lead to problems! CHECK YOUR DATA The computer when sorting or searching will always be accurate, but sometimes our mistakes will make things look wrong. An example of an error is as follows:

13 Accuracy - An example Extra space John Alfred Bill Jane
These names look as if the computer has sorted them into the wrong order. Look carefully at them and you will see a space before the name ‘John’. The computer puts the space before the letter A in the alphabet. Because the name ‘John’ starts with a space, the computer’s rules put it before ‘Alfred’. It looks wrong to us, but it is our mistake not the computer’s.

14 How to set up a field 1. Create a new database 2. Give the database an appropriate name 3. Look at the data you have to enter 4. Decide what type of data is required for each field. 5. Decide how long each field needs to be to fit the data (field size).

15 Some search criteria


Download ppt "DATABASES Surname: Brown Forename: James Form: 7B"

Similar presentations


Ads by Google