SlideShare a Scribd company logo
QUERY DESIGN
QUERY DESIGN
• All queries need to be deigned and should always include the following:
• Fields
• Tables
• Criteria for query
• Sort order
QUERY DESIGN TEMPLATE
• The format for the 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 need to sort the answers.
EXAMPLE 1
• Design a query to list Computing teachers and phone numbers with a
tutor class. This should be sorted in alphabetical order.
Field (s) teacherName, teacherNumber, tutorGroup, Subject
Table (s) Teacher
Search Criteria Subject = Computing AND tutorGroup = True
Sort Order Asec
EXAMPLE 2
• Design a query to list teachers and phone numbers with a tutor class
and on the second floor of the school.
Field (s) teacherName, teacherNumber, tutorGroup, Subject, Floor
Table (s) Teacher
Search Criteria Floor = 2 Computing AND tutorGroup = True
Sort Order

More Related Content

Similar to Query design

ExcelTipsAndTricks.pptx
ExcelTipsAndTricks.pptxExcelTipsAndTricks.pptx
ExcelTipsAndTricks.pptx
John Donahue
 
BLOOM’S TAXONOMY for engineering education.pptx
BLOOM’S TAXONOMY for engineering education.pptxBLOOM’S TAXONOMY for engineering education.pptx
BLOOM’S TAXONOMY for engineering education.pptx
sanjeevsofat
 
MIS 226: Chapter 1
MIS 226: Chapter 1MIS 226: Chapter 1
MIS 226: Chapter 1macrob14
 
Microsoft excel
Microsoft excelMicrosoft excel
Microsoft excel
waszia
 
Results and discussion
Results and discussionResults and discussion
Results and discussion
Dr. Shalini Pandey
 
filterAndSort.pptx
filterAndSort.pptxfilterAndSort.pptx
filterAndSort.pptx
EliLeiba1
 
ADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database SystemsADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database Systems
Joshua Costa
 

Similar to Query design (7)

ExcelTipsAndTricks.pptx
ExcelTipsAndTricks.pptxExcelTipsAndTricks.pptx
ExcelTipsAndTricks.pptx
 
BLOOM’S TAXONOMY for engineering education.pptx
BLOOM’S TAXONOMY for engineering education.pptxBLOOM’S TAXONOMY for engineering education.pptx
BLOOM’S TAXONOMY for engineering education.pptx
 
MIS 226: Chapter 1
MIS 226: Chapter 1MIS 226: Chapter 1
MIS 226: Chapter 1
 
Microsoft excel
Microsoft excelMicrosoft excel
Microsoft excel
 
Results and discussion
Results and discussionResults and discussion
Results and discussion
 
filterAndSort.pptx
filterAndSort.pptxfilterAndSort.pptx
filterAndSort.pptx
 
ADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database SystemsADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database Systems
 

More from SabahtHussein

S3 HTML Hyperlinks and Images
S3 HTML Hyperlinks and ImagesS3 HTML Hyperlinks and Images
S3 HTML Hyperlinks and Images
SabahtHussein
 
S3 HTML Lists and Tables
S3 HTML Lists and TablesS3 HTML Lists and Tables
S3 HTML Lists and Tables
SabahtHussein
 
S3 HTML Structure and Formatting
S3 HTML Structure and FormattingS3 HTML Structure and Formatting
S3 HTML Structure and Formatting
SabahtHussein
 
S3 HTML Introduction
S3 HTML IntroductionS3 HTML Introduction
S3 HTML Introduction
SabahtHussein
 
S1 Programming Lesson 1
S1 Programming Lesson 1S1 Programming Lesson 1
S1 Programming Lesson 1
SabahtHussein
 
S1 Web Development
S1 Web DevelopmentS1 Web Development
S1 Web Development
SabahtHussein
 
Video Games Development
Video Games DevelopmentVideo Games Development
Video Games Development
SabahtHussein
 
S2 Data Types
S2 Data TypesS2 Data Types
S2 Data Types
SabahtHussein
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
SabahtHussein
 
S3 SQL
S3 SQLS3 SQL
Query Design
Query DesignQuery Design
Query Design
SabahtHussein
 
SQL PT
SQL PTSQL PT
S3 Field Types
S3 Field TypesS3 Field Types
S3 Field Types
SabahtHussein
 
Testing a Database
Testing a DatabaseTesting a Database
Testing a Database
SabahtHussein
 
Testing a Database
Testing a DatabaseTesting a Database
Testing a Database
SabahtHussein
 
Database Testing and Evaluation
Database Testing and EvaluationDatabase Testing and Evaluation
Database Testing and Evaluation
SabahtHussein
 
DPA and GDPR
DPA and GDPRDPA and GDPR
DPA and GDPR
SabahtHussein
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
SabahtHussein
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
SabahtHussein
 
Green technology
Green technologyGreen technology
Green technology
SabahtHussein
 

More from SabahtHussein (20)

S3 HTML Hyperlinks and Images
S3 HTML Hyperlinks and ImagesS3 HTML Hyperlinks and Images
S3 HTML Hyperlinks and Images
 
S3 HTML Lists and Tables
S3 HTML Lists and TablesS3 HTML Lists and Tables
S3 HTML Lists and Tables
 
S3 HTML Structure and Formatting
S3 HTML Structure and FormattingS3 HTML Structure and Formatting
S3 HTML Structure and Formatting
 
S3 HTML Introduction
S3 HTML IntroductionS3 HTML Introduction
S3 HTML Introduction
 
S1 Programming Lesson 1
S1 Programming Lesson 1S1 Programming Lesson 1
S1 Programming Lesson 1
 
S1 Web Development
S1 Web DevelopmentS1 Web Development
S1 Web Development
 
Video Games Development
Video Games DevelopmentVideo Games Development
Video Games Development
 
S2 Data Types
S2 Data TypesS2 Data Types
S2 Data Types
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
S3 SQL
S3 SQLS3 SQL
S3 SQL
 
Query Design
Query DesignQuery Design
Query Design
 
SQL PT
SQL PTSQL PT
SQL PT
 
S3 Field Types
S3 Field TypesS3 Field Types
S3 Field Types
 
Testing a Database
Testing a DatabaseTesting a Database
Testing a Database
 
Testing a Database
Testing a DatabaseTesting a Database
Testing a Database
 
Database Testing and Evaluation
Database Testing and EvaluationDatabase Testing and Evaluation
Database Testing and Evaluation
 
DPA and GDPR
DPA and GDPRDPA and GDPR
DPA and GDPR
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Green technology
Green technologyGreen technology
Green technology
 

Recently uploaded

Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 

Query design

  • 2. QUERY DESIGN • All queries need to be deigned and should always include the following: • Fields • Tables • Criteria for query • Sort order
  • 3. QUERY DESIGN TEMPLATE • The format for the 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 need to sort the answers.
  • 4. EXAMPLE 1 • Design a query to list Computing teachers and phone numbers with a tutor class. This should be sorted in alphabetical order. Field (s) teacherName, teacherNumber, tutorGroup, Subject Table (s) Teacher Search Criteria Subject = Computing AND tutorGroup = True Sort Order Asec
  • 5. EXAMPLE 2 • Design a query to list teachers and phone numbers with a tutor class and on the second floor of the school. Field (s) teacherName, teacherNumber, tutorGroup, Subject, Floor Table (s) Teacher Search Criteria Floor = 2 Computing AND tutorGroup = True Sort Order