Download presentation
Presentation is loading. Please wait.
Published byJewel Jefferson Modified over 9 years ago
1
Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678
2
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
Library catalogues Football player statistics Argos catalogue shopping School pupil records Address book Try to think of at least two ideas. What could you use a database for? Try to think of at least two ideas.
4
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:23.4.84 Telephone:020 1234 5678 One record for each Year 7 pupil Five fields in the record
5
The diagram shows how a file is made up of a collection of records. Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678 One record for each Year 7 pupil Five fields in the record Each record is made up of a set of fields.
6
Microsoft Access
7
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 23.4.84 Telephone: 020 1234 5678 One record for each Year 7 pupil Five fields in the record Surname: Forename: Form: Date of Birth:
8
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
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
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
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
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
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. Extra space John Alfred Bill Jane
14
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).
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.