surname:brown forename:james form:7b date of birth:23.4.84 telephone:020 1234 5678

15
Surname: Brown Forename: James Form: 7B Date of Birth: 23.4.84 Telephone: 020 1234 5678

Upload: jewel-jefferson

Post on 03-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

Surname: Brown

Forename: James

Form: 7B

Date of Birth: 23.4.84

Telephone: 020 1234 5678

Page 2: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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.

Page 3: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

Library catalogues Football player statistics Argos catalogue shopping School pupil records Address book What could you use a database for? Try to Try to

think of at least two ideas.think of at least two ideas.

Page 4: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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

Page 5: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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.

Page 6: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

Microsoft Access

Page 7: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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:

Page 8: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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

Page 9: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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.

Page 10: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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.

Page 11: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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?

Page 12: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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 DATACHECK 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:

Page 13: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

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

AlfredBillJane

Page 14: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

1. Create a new database2. Give the database an appropriate name3. Look at the data you have to enter4. 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).

Page 15: Surname:Brown Forename:James Form:7B Date of Birth:23.4.84 Telephone:020 1234 5678

> match items greater than

>= match items greater than or equal

< match items less than

<= match items less than or equal

& Items match both criteria

, Items match either criteria

<> Match items NOT the same as thecriteria