Академический Документы
Профессиональный Документы
Культура Документы
What is a Database?
A structured collection of similar information
that can be searched and sorted.
What is a Database?
Files.RecordsFields?
Files
A file is a collection of records.
Data in a database is saved on the computer as a data file and contains data on a
particular topic
e.g. a Films data file.
Records
A record is a collection of fields.
A record is a collection of organised data on a particular person or item.
Fields
A field is a single item of information.
A field is part of a record that holds a particular piece of data e.g. Surname.
Sample Fields
Here is a sample record from a telephone directory data file made up of
different fields:
Field
Title
Mr.
Forename
John
Surname
Smith
Address
101
High Street
Record
Town
Ayr
Postcode
Tel. No.
KA7 3KL
01292
262626
Inland Revenue
A mailing list
Features of a Database?
Create fields
Search
Sort
Create Fields
Size: You can decide how many characters a field can hold e.g.
a Postcode field to hold KA18 3GH would require a minimum of 8 characters as
the space counts as a character!
Type: Fields can hold different types of data:
A text field holds letters.
A number field holds only numbers.
Date and time fields hold numbers formatted into date and time.
The next step is to enter records into the empty database. A new record has
to
be created for each item. e.g.
Record 1
Mr John
Smith
1 Anytown
Scotland
01929 393939
Mrs Susan
Jones
5 The Town
Scotland
01521 447210
Record 2
Search Records
You can search on a field (or fields) based on certain conditions you require.
e.g. search for the forenames and surnames of people whose test mark was
greater than 50.
Sort Records
alphabetic
numeric
ascending (1,2,3,4,5)
descending (Z, Y, X, W )
The sort is done by choosing which field the database is to be sorted into
e.g. sort alphabetically by surname.
Computed Fields
Example:
If a database has the fields <Total Pay> and <Total Deductions>, then a third
called <Net Pay> could be set up with the formula:
(=Total Pay Total Deductions).
This is a computed field.
The position of fields can be rearranged and formatted into a particular order
and layout.
This is useful for designing input screens and producing documents such
as invoices for output.
Keywords
Use of Keywords
When searching for a particular record or part of it, the text that is used for the
search is called a keyword.
However, care must be taken that the correct keywords are used.
Understanding
Relational Databases
Tables
Queries
Forms
Reports
Macros
Table B
What is Related?
We say the two TABLES are related
We really mean certain RECORDS in the
two tables are related
Ability to relate records in multiple tables
gives relational databases their power
One-to-One Relationship
Table A
Table B
Record 1
Record 1
Record 2
Record 2
Record 3
Record 3
Record 4
Record 4
One-to-Many Relationship
Table A
Table B
Record 1
Record 1A
Record 1B
Record 1C
Record 2
Record 2A
Record 2B
Record 3
Record 4
Record 3A
Record 3B
Record 3C
Record 3D
Record 4A
Record 4B
Table A
Table D
Table C
Lookup
Table E
ID fields (numeric)
ID fields (numeric)
Collection Subtable
Case 1A
Case 1B
Case 1C
Case 2A
Case 2B
Case 3A
Case 3B