Top Banner
Queries Queries Objective 5.02 Understand Objective 5.02 Understand queries, forms, and reports queries, forms, and reports used in business. used in business.
7
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Queries

QueriesQueries

Objective 5.02 Understand Objective 5.02 Understand queries, forms, and reports used queries, forms, and reports used

in business.in business.

Page 2: Queries

5.02 Understand database queries, forms, and reports used in business. Slide 2

Database ObjectsDatabase Objects

►Objective 5.01 discussed and Objective 5.01 discussed and explained how tables are the building explained how tables are the building blocks for all databases. blocks for all databases.

►This objective will use tables to create This objective will use tables to create three types of database objects:three types of database objects: QueriesQueries FormsForms ReportsReports

Page 3: Queries

5.02 Understand database queries, forms, and reports used in business. Slide 3

QueryQuery►A database object created by placing A database object created by placing

filters and selecting multiple criteria filters and selecting multiple criteria (comparison operators) to extract (comparison operators) to extract information from one or more tables information from one or more tables

Page 4: Queries

5.02 Understand database queries, forms, and reports used in business. Slide 4

Advantages of a QueryAdvantages of a Query

►Can be saved and used to perform other Can be saved and used to perform other operations.operations.

►One table can be associated with One table can be associated with multiple queries.multiple queries.

►Can perform specialized operations Can perform specialized operations For example, calculations can be performed For example, calculations can be performed

on field values and the results can be placed on field values and the results can be placed in a new column of a datasheet.in a new column of a datasheet.

Page 5: Queries

5.02 Understand database queries, forms, and reports used in business. Slide 5

The Difference Between The Difference Between Queries and FiltersQueries and Filters

► A filter is a one-time deal. A filter is a one-time deal. It allows It allows application of a set of selection criteria and/or application of a set of selection criteria and/or sorting instructions to the records in a table.sorting instructions to the records in a table. It is It is a quick and temporary tool that is created for a quick and temporary tool that is created for one-time use in the context of a particular table. one-time use in the context of a particular table.

► A query is reusableA query is reusable. It allows the selection . It allows the selection criteria and/or sorting instructions to be saved criteria and/or sorting instructions to be saved and reused. and reused.

Page 6: Queries

5.02 Understand database queries, forms, and reports used in business. Slide 6

Comparison Operators Comparison Operators for Queries and Filtersfor Queries and Filters

Less ThanLess Than <<

Greater ThanGreater Than > >

Equal ToEqual To ==

Less Than or Less Than or Equal ToEqual To <=<=

Greater Than Greater Than or Equal Toor Equal To >=>=

Not Equal ToNot Equal To <><>

Page 7: Queries

5.02 Understand database queries, forms, and reports used in business. Slide 7

Conditional Operators Conditional Operators for Queries and Filters for Queries and Filters

► The The ANDAND condition condition reducesreduces the number the number of records because both conditions must of records because both conditions must be met.be met.

► The The OROR condition condition increasesincreases the number the number of records because records are selected if of records because records are selected if either condition is met.either condition is met.