What are the major types of queries in a database?

      

Discuss the major types of queries in a database.

  

Answers


Maurice
(a) Select query:

The following are the uses of a select query:
(i) Displaying the results in a database.

(ii) Retrieving data form one (or more) tables).

(iii) Viewing a subset of records.

(iv) Updating the records from within the datasheet.

(v) Grouping records and doing calculations ( sum, average, counts, totals and other types of calculations).

(b) Parameter query: This is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field.

(c) Action query: It is a query that makes changes to or moves many records in just one operation.

The following are the types of action queries:

(i) Delete query: A delete query deletes a group of records from one or more tables. Delete queries remove the entire record, not just selected fields within records. For example, you can run a query to delete students in the database who have been expelled in school.

(ii) Update query: Using update query, you can make global changes to a group of records in one or more tables. For example, you can raise marks by 10% for all Students ( or a subset of students).

(iii) Append query: An append query adds a group of records from one or more tables to the end of one or more tables. For example, suppose that you want to promote students in Form 1 to Form 2, you can append records into the Form 2 table and delete them using a Delete query form Form 1 table.

(iv) Make-table query: A make-table query creates a new table from data in one or more tables. For example, from school database, you can run a Make table query to create a particular Dormitory details table.

(v) Crosstab queries: Crosstab queries calculate a sum, average, count, or other types of total for data that is grouped by two types of information-one down the left side of the datasheet and another across the top.
maurice.mutuku answered the question on April 12, 2018 at 06:00


Next: Why would you use queries in databases?
Previous: How can you write a select query criterion statement that could be used to select data from a "DueDate" field for deliveries placed after 8th...

View More Computer Studies Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions