Databases Letts Chapter 11. A database program can be used to: sort a file into a different order; ...

9
Databases Letts Chapter 11

Transcript of Databases Letts Chapter 11. A database program can be used to: sort a file into a different order; ...

Page 1: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

Databases

Letts Chapter 11

Page 2: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

A database program can

be used to:

sort a file into a different order; search through the records for a

matching string. select records which fit certain

conditions

Page 3: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

Ready-made database files are available on:

floppy disc, CD-ROM’s on-line using public networks

Page 4: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

Before you can create your own database file you have to:

decide what data is required for the problem you are solving;

think of a name for your data file; plan what fields you are going to have; decide on a key field or sort field; plan how to collect and record the data

before it is typed in.

Page 5: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

Common data types used in databases are:

alphanumeric number date integer label logical

Page 6: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

Data can be collected by recording it on a data capture form.

This can be one of the following questionnaire (form format) table format.

Page 7: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

To create a database you would normally have to:produce a data capture form;collect and record the data to be keyed it;run the database program;name the database file;key in for each field its name, type and

possibly its length;choose a sort field;enter the data into the database - one record at a time; close or save the database.

Page 8: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

To retrieve information from a file you can set up a query condition. The program then selects all records which match the condition.

Query conditions can include: comparisons based on

= (equal to)

< (less than)

> (greater than)

<>, >=, <=

the logical operators AND, OR and NOT; comparisons with sub-strings.

Page 9: Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.

A sort rearranges a file into a given order.

A file can be sorted into ascending or descending order.

A database report is a set of results from work on a database put together as a document for printing.

A query language is the set of words and symbols which are used to retrieve information from a database.