Page 95 - Database-En-V3
P. 95

Query

Training activities:

Apply what was explained in how to create a query for database tables for a

university.

• The trainee creates a query for each of the previous training tables.

Scientific background:

Definition: Query is a question about the data stored in your tables or a request to
perform an action on the data. A query may combine data from multiple tables to
serve as a data source for a form, report, or data page.
A query is simply a question that you ask about your data in order to get an answer
by running this query. For example, you may ask:

   • Which student received an excellent grade this year?
   • How many students graduate in a given year?
   • What is the average score for each student?
   • What are the records of graduate students? Or non-graduate students?
   • Delete the graduate student records from the student table.
   • Update student records, add two grades for each student, and so on
So we use the query to display, change, and analyze data in different ways. The
database engine collects data that answers your question from one or more tables.
Every time you run the query, you will get the latest information from the database.

How to deal with the query:

               You can handle the query in two ways:
               The first is the design view to create or update the query structure. When you work
               in Design View, you ask questions about your data to determine which data you
               want and determine how to arrange it.
               The Second: Display the data page to add, edit, and analyze the data itself.

                 To see the results, run the query. Explanation of the types of queries and the query
               selection window. There are several types of queries. We will enumerate them first
               with a simplified definition of each, and then we will detail the explanation of each
               type and write multiple examples of it.

88 Training unit in the field of technological information - at the Supreme Council of Universities © Intellectual property rights 2024
   90   91   92   93   94   95   96   97   98   99   100