9
Databases

Databases. A database is simply a collection of information stored in an orderly manner. A database can be as simple as a birthday book, address book

Embed Size (px)

Citation preview

Page 1: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

Databases

Page 2: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

A database is simply a collection of A database is simply a collection of information stored in an orderly manner.information stored in an orderly manner.

A database can be as simple as a birthday book, A database can be as simple as a birthday book, address book or telephone directory. address book or telephone directory.

However, the term database is generally used to However, the term database is generally used to mean a collection of information which is stored mean a collection of information which is stored on a computer.on a computer.

In order to create and use your collection of In order to create and use your collection of information, you need to use a database information, you need to use a database application.application.

An example of a database application is Microsoft An example of a database application is Microsoft Access.Access.

Page 3: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

A database can be used for:A database can be used for: sorting sorting records into a particular order e.g. records into a particular order e.g.

by surname, starting at A;by surname, starting at A; searchingsearching through the records to find a through the records to find a

particular one e.g. Mr Andrewsparticular one e.g. Mr Andrews selectingselecting records which fit certain records which fit certain

conditions e.g. ‘All of the females who live conditions e.g. ‘All of the females who live in Warwickshire’in Warwickshire’

Page 4: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

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

decidedecide what data you will require to solve what data you will require to solve the problem;the problem;

thinkthink of a name for your database file; of a name for your database file; planplan what fields you are going to have; what fields you are going to have; decidedecide on a key field; on a key field; planplan how to collect and record the data how to collect and record the data

before it is typed in.before it is typed in.

Page 5: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

Common Common data typesdata types used in used in databases are:databases are:

alphanumeric or textalphanumeric or text numbernumber date/timedate/time currencycurrency logical or yes/nological or yes/no

Page 6: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

You will need to You will need to create a create a data data capture formcapture form. .

Here is an exampleHere is an example

Page 7: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

To create a database you would normally To create a database you would normally have to:have to:produce a data capture form;produce a data capture form;collect and record the data using your collect and record the data using your form;form;create your database table;create your database table;choose the correct data types and field choose the correct data types and field sizessizeschoose your field sizeschoose your field sizesapply appropriate validation methodsapply appropriate validation methods

Page 8: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

To To retrieve informationretrieve information from your database you can from your database you can create a query condition. The database program then create a query condition. The database program then selects all records which match the condition.selects all records which match the condition.

Query conditions can include:Query conditions can include: comparisons comparisons based on based on

= (equal to)= (equal to) < (less than)< (less than) > (greater than) > (greater than) <>, >=, <=<>, >=, <=

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

Page 9: Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book

You can You can sortsort the data in your file. This the data in your file. This rearranges all of the records in relation to one rearranges all of the records in relation to one particular field either into particular field either into ascending or ascending or descending order.descending order.

You can create a You can create a report. report. This is a professional This is a professional way of displaying a set of records either in a way of displaying a set of records either in a table or obtained from one of your queries.table or obtained from one of your queries.