Query Design
What is Query Design?
• It is important to take time to design all queries before we can
create them.
• SQL (Structured Query Language) will only be used to run each
query implementation.
Query Design Template
• The standard format for a query design table:
Field (s) This shows the fields required for the query.
Table (s) This shows the table each field comes from,
this can be more than one.
Search Criteria This shows the conditions required for the
query.
Sort Order If the query needs to sort the answers
Example 1
• Design a query to list Computing teachers with their phone
numbers in the school. This should be sorted in alphabetical order.
Field (s) teacherName, TeacherNumber
Table (s) Teacher
Search Criteria Subject = Computing
Sort Order ASC

Query Design

  • 1.
  • 2.
    What is QueryDesign? • It is important to take time to design all queries before we can create them. • SQL (Structured Query Language) will only be used to run each query implementation.
  • 3.
    Query Design Template •The standard format for a query design table: Field (s) This shows the fields required for the query. Table (s) This shows the table each field comes from, this can be more than one. Search Criteria This shows the conditions required for the query. Sort Order If the query needs to sort the answers
  • 4.
    Example 1 • Designa query to list Computing teachers with their phone numbers in the school. This should be sorted in alphabetical order. Field (s) teacherName, TeacherNumber Table (s) Teacher Search Criteria Subject = Computing Sort Order ASC