CSC408 Management Information System Creating Queries



QueriesA query is a request to select specific information from table(s). Queries do not hold any data; they hold or save the criteria used to select the data from the table(s). If the table related to a query is deleted (intentionally or unintentionally) the query will no longer function.Queries can be used to analyze data, display specific information, and serve as the basic for forms or reports. A query can be used to specify desired fields and criteria to display information from a table, related tables, or other tables. Queries are different from tables even though the interfaces of tables and queries are very similar to each other. A table must exist before a query or any other database object can be created.Creating Queries with graphical design facilities in Access DBMS Creating Query using Query Design190508255Creating a query in Query Design (Design View) gives the user control over the design of the query including adding or deleting criteria to selected records and sorting results in the record set. The Query Design window consists of top and bottom Pane: Write click the top pane in order to view the show table dialog box.Displays the table(s) used in the query.More than one table can be selected.Bottom Pane: Specifies the fields used in the query, criteria to retrieve the desired information, sort parameters in the query (ascending or descending order), and whether a field is displayed when the query is run.Field: here we place the field to use which will usually be the field to visualize, it could be a field from the table or a calculated field.Table: name of the table we want to extract the field from. This will be useful when we are defining queries based on various tables.Sort: serves to arrange the resulting rows in a determinate order.Show: if not marked, the column does not appear in the result, it is usually unmarked when we want to use the field to define the query but don't want the field to appear in the result. Criteria: serve to specify the lookup criteria. A lookup criteria is a condition that records need to comply with to appear in the result of the query. It can be made up from one or from various conditions, joined by AND and OR operators.or: this row and those after are used to make multiple-conditions.Execute: Click the run symbol in order to execute the queryExample: Total order for each biscuitOutput:After execute27152603438525Totals: Click the Totals symbol in order to view the total fieldsExample: Searching Single Customer OrderShow: Checked the show field in order to view the field value within the resultsUnchecked if do not want to view the field valueCriteria: Write the text for searching criteria.It will be appear within the searching dialog box ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download