Queries

If databases are designed well sophisticated queries can be used to retrieve the information in a variety of ways. Access provides a powerful querying tool called QBE which will be covered in this topic.


Develop your skills - Queries

Stable 2007 textbook
Stable 2003 textbook

SET TEXT
Chapter 5
pp. 413-441
or
Chapter 5
pp. 411-441

The following reading details how to create a range of queries using both the Query Wizard and Query Design View. Concentrate on understanding the Design View as it will give you much more power and flexability in your queries. By the time you have finished the reading you should feel confident that you can extract information from the database.


TASK 1: Complete the Develop Your Skills 9 - 12, pp. 438 - 441.

Tips & tricks icon Tips & Tricks

Querying

The querying skills you have learnt generalise to much more than just Access. With some adjustments, the same querying techniques can be used on most databases.

TASK 2: For example, look at the advanced search capabilities at Google.

Calculated queries (p. 431-433)

Never store data in a table that you can calculate. For example, do not have an age field if you already have a date of birth field. Storing both is a form of data duplication - something you should avoid at all costs. In this example you should store the date of birth which does not change rather than the age which needs to be updated once a year (also if you do not store the date of birth how will you know when to update the age?). If you need the age, you can use a calculated query.


Putting it to work: Queries

Querying is an essential part of any database including Access. The link opposite lists some more queries that you can practice on.


 



What have I learned?

After completing these activities you should be able to successfully retrieve information from a databse using a variety of queries, eg. queries involving multiple conditions using AND and OR, calculated queries etc.



Next section --> Forms