SlideShare a Scribd company logo
1 of 52
PowerPoint Presentation to Accompany GO! with Microsoft® Access 2010 Chapter 2 Sort and Query a Database
Objectives Open an Existing Database Create Table Relationships Sort Records in a Table Create a Query in Design View Create a New Query from an Existing Query
Objectives Sort Query Results Specify Criteria in a Query Specify Numeric Criteria in a Query Use Compound Criteria Create a Query Based on More Than One Table
Objectives Use Wildcards in a Query Use Calculated Fields in a Query  Calculate Statistics and Group Data in a Query Create a Crosstab Query
Open an Existing Database You can open a database file and save it with a new name. The Message Bar is the area below the Ribbon that displays information such as security alerts. The Enable Content button—when you know the database is safe to use on your computer
Open an Existing Database
Create Table Relationships Access databases are relational databases, they connect to other tables through common fields. Common fields are fields that contain the same data in more than one table. After you have a table for each subject in your database, you must provide a way to connect the data in the tables when you need meaningful information.
Create Table Relationships To connect the data in your tables, create common fields in related tables, and then define table relationships. A relationship is an association established between two tables based on common fields. Once established, you create a query, a form, or a report that displays information from more than one table.
Create Table Relationships
Create Table Relationships ,[object Object],[object Object],[object Object]
Create Table Relationships ,[object Object]
Foreign key—field in the related table that connects the primary key in another table
The one side—typically the primary key
Referential integrity—set of rules to ensure that the data between related tables is valid,[object Object]
Displays between the two tables,[object Object]
Sort Records in a Table Sort records on two or more fields: Outermost sort field—first level of sorting Innermost sort field—second level of sorting For example, you might want to sort first by the Last Name field (outermost sort field), and then by the First Name field (innermost sort field).
Sort Records in a Table Sorting records: Ascending order sorts text alphabetically (A to Z) and sorts numbers from the lowest number to the highest number. Descending order sorts text in reverse.
Create a Query in Design View Query Answers a question Creates a subset of records, according to your specifications Select query—database object that retrieves (selects) specific data from one or more tables Query Design view—creates complex queries
Create a Query in Design View Data source—table or tables where a query selects its data
Create a Query in Design View ,[object Object]
Table area (upper area)—displays field lists for tables used in the query
Design grid (lower area)—displays design for the query,[object Object],[object Object]
Sort Query Results Sort results of a query in ascending or descending order in either Datasheet view or Design view.
Sort Query Results Design view—results displayed in a specified sort order, or for sorted results in a report Fields with a Sort designation are sorted from left to right. Sorted field on left becomes the outermost sort field. Sorted field on right becomes the innermost sort field. Sorted results not what you intended? Be sure fields are displayed from left to right according to the groupings desired.
Sort Query Results
Specify Criteria in a Query Queries locate information based on criteria. Criteria  Are conditions that identify the specific records you are looking for Enable you to ask specific questions to get specific results
Specify Criteria in a Query
Specify Criteria in a Query Locate records where data is missing Missing records can be located using Is Null—empty—as the criteria the field Is Not Null—displays only records where a value has been entered as the criteria
Specify Numeric Criteria in a Query Numeric data can be set as fields. Design your table setting using data type for fields that will contain numbers, currency, or dates so mathematical calculations can be performed.
Specify Numeric Criteria in a Query
Specify Numeric Criteria in a Query Comparison operators—symbols that evaluate each field value Can determine if it is the same (=), greater than (>), less than (<), or in between a range of values as specified by the criteria. Equal (=) is assumed, if no comparison operator is specified.
Specify Numeric Criteria in a Query Between . . . And operator—a comparison operator that looks for values within a range
Use Compound Criteria Compound criteria—to specify more than one condition—criteria—in a query Compound criteria use AND and OR logical operators. AND condition requires records to meet all parts of the specified criteria. OR condition specifies multiple criteria for a single field, or multiple criteria for different fields and displays records that meet any of the conditions. Logical operators enable entry of criteria for the same field or different fields.
Use Compound Criteria
Create a Query Based on More Than One Table Relational database—retrieve information from more than one table Tables are joined by relating the primary key field in one table to a foreign key field in another.  Creates a relationship Enables inclusion of data from more than one table in a query When extracting data from multiple tables, the information on the Table row is helpful, especially when different tables include the same field names.
Create a Query Based on More Than One Table
Use Wildcards in a Query Wildcard characters—serve as a placeholder for one or more unknown characters in the criteria Use wildcard characters in place of the characters: Asterisk (*) is a placeholder to match one or more characters. Question mark (?) is a wildcard that is used to search for unknown single characters.
Use Wildcards in a Query
Use Calculated Fields in a Query Calculated field—queries created from calculated values are stored here A calculated field stores the value of a mathematical operation. Multiply two fields together without having to include a specific field for this amount in the table, which reduces the size of the database and provides more flexibility.
Use Calculated Fields in a Query Calculated field query two steps: Name the field that will store the calculated values. Write the expression—the formula—that performs the calculation. Each field name used in the calculation must be enclosed within its own pair of square brackets.
Use Calculated Fields in a Query Zoom dialog box—more working space enables you to see the entire calculation
Use Calculated Fields in a Query ,[object Object],[object Object]
Calculate Statistics and Group Data in a Query
Calculate Statistics and Group Data in a Query
Calculate Statistics and Group Data in a Query Using aggregate functions in a query
Create a Crosstab Query A crosstab query: Uses an aggregate function for data that can be grouped by two types of information  Displays data in a compact, spreadsheet-like format Always has at least one row heading, one column heading, and one summary field Use a crosstab query to summarize a large amount of data in a small space so that is easy to read
Create a Crosstab Query
Covered Objectives Open an Existing Database Create Table Relationships Sort Records in a Table Create a Query in Design View Create a New Query from an Existing Query
Covered Objectives Sort Query Results Specify Criteria in a Query Specify Numeric Criteria in a Query Use Compound Criteria Create a Query Based on More Than One Table
Covered Objectives Use Wildcards in a Query Use Calculated Fields in a Query  Calculate Statistics and Group Data in a Query Create a Crosstab Query
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2011 Pearson Education, Inc.   Publishing as Prentice Hall
MS Access Ch 2 PPT

More Related Content

What's hot

Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tables
Jhen Articona
 

What's hot (20)

Mail merge - Get Complete Information !!
Mail merge - Get Complete Information !!Mail merge - Get Complete Information !!
Mail merge - Get Complete Information !!
 
MS ACCESS PPT.pptx
MS ACCESS PPT.pptxMS ACCESS PPT.pptx
MS ACCESS PPT.pptx
 
2.3.1 creating database, table and relationship on Access 2003
2.3.1 creating database, table and relationship on Access 20032.3.1 creating database, table and relationship on Access 2003
2.3.1 creating database, table and relationship on Access 2003
 
Introduction to microsoft word 2007
Introduction to microsoft word 2007Introduction to microsoft word 2007
Introduction to microsoft word 2007
 
Class viii ch-4 working with queries
Class  viii ch-4 working with queriesClass  viii ch-4 working with queries
Class viii ch-4 working with queries
 
Ms word 2013 Training
Ms word 2013 TrainingMs word 2013 Training
Ms word 2013 Training
 
001.general
001.general001.general
001.general
 
Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tables
 
Ms word 2007
Ms word 2007Ms word 2007
Ms word 2007
 
Ms access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal sahaMs access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal saha
 
Creating a table in ms access
Creating a table in ms accessCreating a table in ms access
Creating a table in ms access
 
Excel 2010
Excel 2010Excel 2010
Excel 2010
 
Ms access
Ms accessMs access
Ms access
 
Ms excel
Ms excelMs excel
Ms excel
 
Charts and pivot tables
Charts and pivot tablesCharts and pivot tables
Charts and pivot tables
 
Ms access
Ms accessMs access
Ms access
 
Charts in EXCEL
Charts in EXCELCharts in EXCEL
Charts in EXCEL
 
Ms excel 2007
Ms excel 2007Ms excel 2007
Ms excel 2007
 
Ms access
Ms accessMs access
Ms access
 
Microsoft word basics
Microsoft word basicsMicrosoft word basics
Microsoft word basics
 

Viewers also liked

MS Access Ch 1 PPT
MS Access Ch 1 PPTMS Access Ch 1 PPT
MS Access Ch 1 PPT
prsmith72
 
D I T211 Chapter 2 ( Lab 1)
D I T211    Chapter 2 ( Lab 1)D I T211    Chapter 2 ( Lab 1)
D I T211 Chapter 2 ( Lab 1)
askme
 
MS Word Chapter 3 PPT
MS Word Chapter 3 PPTMS Word Chapter 3 PPT
MS Word Chapter 3 PPT
prsmith72
 
computer virus and related legal issues
computer virus and related legal issuescomputer virus and related legal issues
computer virus and related legal issues
Shweta Ghate
 
MS Word Chapter 2 PPT
MS Word Chapter 2 PPTMS Word Chapter 2 PPT
MS Word Chapter 2 PPT
prsmith72
 
MS Word Chapter 1 PPT
MS Word Chapter 1 PPTMS Word Chapter 1 PPT
MS Word Chapter 1 PPT
prsmith72
 
Access lesson05
Access lesson05Access lesson05
Access lesson05
Aram SE
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying Forms
Aram SE
 
presentation on computer virus
presentation on computer viruspresentation on computer virus
presentation on computer virus
Yogesh Singh Rawat
 
Access lesson 03 Creating Queries
Access lesson 03 Creating QueriesAccess lesson 03 Creating Queries
Access lesson 03 Creating Queries
Aram SE
 
Microsoft word basics ppt
Microsoft word basics pptMicrosoft word basics ppt
Microsoft word basics ppt
jdbutler13
 

Viewers also liked (17)

MS Access Ch 1 PPT
MS Access Ch 1 PPTMS Access Ch 1 PPT
MS Access Ch 1 PPT
 
D I T211 Chapter 2 ( Lab 1)
D I T211    Chapter 2 ( Lab 1)D I T211    Chapter 2 ( Lab 1)
D I T211 Chapter 2 ( Lab 1)
 
MS Word Chapter 3 PPT
MS Word Chapter 3 PPTMS Word Chapter 3 PPT
MS Word Chapter 3 PPT
 
computer virus and related legal issues
computer virus and related legal issuescomputer virus and related legal issues
computer virus and related legal issues
 
MS Word Chapter 2 PPT
MS Word Chapter 2 PPTMS Word Chapter 2 PPT
MS Word Chapter 2 PPT
 
COMPUTERS ( types of viruses)
COMPUTERS ( types of viruses)COMPUTERS ( types of viruses)
COMPUTERS ( types of viruses)
 
Types of Virus & Anti-virus
Types of Virus & Anti-virusTypes of Virus & Anti-virus
Types of Virus & Anti-virus
 
MS Word Chapter 1 PPT
MS Word Chapter 1 PPTMS Word Chapter 1 PPT
MS Word Chapter 1 PPT
 
Access lesson05
Access lesson05Access lesson05
Access lesson05
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying Forms
 
presentation on computer virus
presentation on computer viruspresentation on computer virus
presentation on computer virus
 
Access lesson 03 Creating Queries
Access lesson 03 Creating QueriesAccess lesson 03 Creating Queries
Access lesson 03 Creating Queries
 
Microsoft word ppt presentation
 Microsoft word  ppt presentation Microsoft word  ppt presentation
Microsoft word ppt presentation
 
Ms access 2007
Ms access 2007Ms access 2007
Ms access 2007
 
ANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentationANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentation
 
Word 2007 Presentation
Word 2007 PresentationWord 2007 Presentation
Word 2007 Presentation
 
Microsoft word basics ppt
Microsoft word basics pptMicrosoft word basics ppt
Microsoft word basics ppt
 

Similar to MS Access Ch 2 PPT

MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access Tutorial
virtualMaryam
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms access
jigeno
 
1 Week 6 - What Well Be Working On This Week In th.docx
1 Week 6 - What Well Be Working On This Week  In th.docx1 Week 6 - What Well Be Working On This Week  In th.docx
1 Week 6 - What Well Be Working On This Week In th.docx
dorishigh
 
Operate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptxOperate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptx
Esubalew21
 
10359485
1035948510359485
10359485
kavumo
 
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxAB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
bartholomeocoombs
 

Similar to MS Access Ch 2 PPT (20)

Chapter 4 microsoft access 2010
Chapter 4 microsoft access 2010Chapter 4 microsoft access 2010
Chapter 4 microsoft access 2010
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access Tutorial
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
Excel 2007 Unit H
Excel 2007 Unit HExcel 2007 Unit H
Excel 2007 Unit H
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms access
 
003.query
003.query003.query
003.query
 
1 Week 6 - What Well Be Working On This Week In th.docx
1 Week 6 - What Well Be Working On This Week  In th.docx1 Week 6 - What Well Be Working On This Week  In th.docx
1 Week 6 - What Well Be Working On This Week In th.docx
 
Operate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptxOperate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptx
 
Module 08 Access & Use Database Application.pptx
Module 08 Access & Use Database Application.pptxModule 08 Access & Use Database Application.pptx
Module 08 Access & Use Database Application.pptx
 
New slides access
New slides accessNew slides access
New slides access
 
10359485
1035948510359485
10359485
 
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxAB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
 
MS Access 2010 tutorial 5
MS Access 2010 tutorial 5MS Access 2010 tutorial 5
MS Access 2010 tutorial 5
 
Ppt Lesson 13
Ppt Lesson 13Ppt Lesson 13
Ppt Lesson 13
 
Queries
QueriesQueries
Queries
 
AIA101.2.Access Queries Accelerated
AIA101.2.Access Queries AcceleratedAIA101.2.Access Queries Accelerated
AIA101.2.Access Queries Accelerated
 
Advanced Excel ppt
Advanced Excel pptAdvanced Excel ppt
Advanced Excel ppt
 
Access.05
Access.05Access.05
Access.05
 

More from prsmith72

More from prsmith72 (8)

MS PowerPoint Ch 3 PPT
MS PowerPoint Ch 3 PPTMS PowerPoint Ch 3 PPT
MS PowerPoint Ch 3 PPT
 
MS PowerPoint Ch 2 PPT
MS PowerPoint Ch 2 PPTMS PowerPoint Ch 2 PPT
MS PowerPoint Ch 2 PPT
 
MS PowerPoint Ch 1 PPT
MS PowerPoint Ch 1 PPTMS PowerPoint Ch 1 PPT
MS PowerPoint Ch 1 PPT
 
MS Access Ch 3 PPT
MS Access Ch 3 PPTMS Access Ch 3 PPT
MS Access Ch 3 PPT
 
MS Excel Ch 3 PPT
MS Excel Ch 3 PPTMS Excel Ch 3 PPT
MS Excel Ch 3 PPT
 
MS Excel Ch 2 PPT
MS Excel Ch 2 PPTMS Excel Ch 2 PPT
MS Excel Ch 2 PPT
 
MS Excel Ch 1 PPT
MS Excel Ch 1 PPTMS Excel Ch 1 PPT
MS Excel Ch 1 PPT
 
Common Features PPT
Common Features PPTCommon Features PPT
Common Features PPT
 

Recently uploaded

ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
ashishpaul799
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
SaadHumayun7
 

Recently uploaded (20)

An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPost Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
factors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxfactors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
 
Mbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptxMbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptx
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 

MS Access Ch 2 PPT

  • 1. PowerPoint Presentation to Accompany GO! with Microsoft® Access 2010 Chapter 2 Sort and Query a Database
  • 2. Objectives Open an Existing Database Create Table Relationships Sort Records in a Table Create a Query in Design View Create a New Query from an Existing Query
  • 3. Objectives Sort Query Results Specify Criteria in a Query Specify Numeric Criteria in a Query Use Compound Criteria Create a Query Based on More Than One Table
  • 4. Objectives Use Wildcards in a Query Use Calculated Fields in a Query Calculate Statistics and Group Data in a Query Create a Crosstab Query
  • 5. Open an Existing Database You can open a database file and save it with a new name. The Message Bar is the area below the Ribbon that displays information such as security alerts. The Enable Content button—when you know the database is safe to use on your computer
  • 6. Open an Existing Database
  • 7. Create Table Relationships Access databases are relational databases, they connect to other tables through common fields. Common fields are fields that contain the same data in more than one table. After you have a table for each subject in your database, you must provide a way to connect the data in the tables when you need meaningful information.
  • 8. Create Table Relationships To connect the data in your tables, create common fields in related tables, and then define table relationships. A relationship is an association established between two tables based on common fields. Once established, you create a query, a form, or a report that displays information from more than one table.
  • 10.
  • 11.
  • 12. Foreign key—field in the related table that connects the primary key in another table
  • 13. The one side—typically the primary key
  • 14.
  • 15.
  • 16. Sort Records in a Table Sort records on two or more fields: Outermost sort field—first level of sorting Innermost sort field—second level of sorting For example, you might want to sort first by the Last Name field (outermost sort field), and then by the First Name field (innermost sort field).
  • 17. Sort Records in a Table Sorting records: Ascending order sorts text alphabetically (A to Z) and sorts numbers from the lowest number to the highest number. Descending order sorts text in reverse.
  • 18. Create a Query in Design View Query Answers a question Creates a subset of records, according to your specifications Select query—database object that retrieves (selects) specific data from one or more tables Query Design view—creates complex queries
  • 19. Create a Query in Design View Data source—table or tables where a query selects its data
  • 20.
  • 21. Table area (upper area)—displays field lists for tables used in the query
  • 22.
  • 23. Sort Query Results Sort results of a query in ascending or descending order in either Datasheet view or Design view.
  • 24. Sort Query Results Design view—results displayed in a specified sort order, or for sorted results in a report Fields with a Sort designation are sorted from left to right. Sorted field on left becomes the outermost sort field. Sorted field on right becomes the innermost sort field. Sorted results not what you intended? Be sure fields are displayed from left to right according to the groupings desired.
  • 26. Specify Criteria in a Query Queries locate information based on criteria. Criteria Are conditions that identify the specific records you are looking for Enable you to ask specific questions to get specific results
  • 28. Specify Criteria in a Query Locate records where data is missing Missing records can be located using Is Null—empty—as the criteria the field Is Not Null—displays only records where a value has been entered as the criteria
  • 29. Specify Numeric Criteria in a Query Numeric data can be set as fields. Design your table setting using data type for fields that will contain numbers, currency, or dates so mathematical calculations can be performed.
  • 31. Specify Numeric Criteria in a Query Comparison operators—symbols that evaluate each field value Can determine if it is the same (=), greater than (>), less than (<), or in between a range of values as specified by the criteria. Equal (=) is assumed, if no comparison operator is specified.
  • 32. Specify Numeric Criteria in a Query Between . . . And operator—a comparison operator that looks for values within a range
  • 33. Use Compound Criteria Compound criteria—to specify more than one condition—criteria—in a query Compound criteria use AND and OR logical operators. AND condition requires records to meet all parts of the specified criteria. OR condition specifies multiple criteria for a single field, or multiple criteria for different fields and displays records that meet any of the conditions. Logical operators enable entry of criteria for the same field or different fields.
  • 35. Create a Query Based on More Than One Table Relational database—retrieve information from more than one table Tables are joined by relating the primary key field in one table to a foreign key field in another. Creates a relationship Enables inclusion of data from more than one table in a query When extracting data from multiple tables, the information on the Table row is helpful, especially when different tables include the same field names.
  • 36. Create a Query Based on More Than One Table
  • 37. Use Wildcards in a Query Wildcard characters—serve as a placeholder for one or more unknown characters in the criteria Use wildcard characters in place of the characters: Asterisk (*) is a placeholder to match one or more characters. Question mark (?) is a wildcard that is used to search for unknown single characters.
  • 38. Use Wildcards in a Query
  • 39. Use Calculated Fields in a Query Calculated field—queries created from calculated values are stored here A calculated field stores the value of a mathematical operation. Multiply two fields together without having to include a specific field for this amount in the table, which reduces the size of the database and provides more flexibility.
  • 40. Use Calculated Fields in a Query Calculated field query two steps: Name the field that will store the calculated values. Write the expression—the formula—that performs the calculation. Each field name used in the calculation must be enclosed within its own pair of square brackets.
  • 41. Use Calculated Fields in a Query Zoom dialog box—more working space enables you to see the entire calculation
  • 42.
  • 43. Calculate Statistics and Group Data in a Query
  • 44. Calculate Statistics and Group Data in a Query
  • 45. Calculate Statistics and Group Data in a Query Using aggregate functions in a query
  • 46. Create a Crosstab Query A crosstab query: Uses an aggregate function for data that can be grouped by two types of information Displays data in a compact, spreadsheet-like format Always has at least one row heading, one column heading, and one summary field Use a crosstab query to summarize a large amount of data in a small space so that is easy to read
  • 48. Covered Objectives Open an Existing Database Create Table Relationships Sort Records in a Table Create a Query in Design View Create a New Query from an Existing Query
  • 49. Covered Objectives Sort Query Results Specify Criteria in a Query Specify Numeric Criteria in a Query Use Compound Criteria Create a Query Based on More Than One Table
  • 50. Covered Objectives Use Wildcards in a Query Use Calculated Fields in a Query Calculate Statistics and Group Data in a Query Create a Crosstab Query
  • 51. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2011 Pearson Education, Inc.   Publishing as Prentice Hall

Editor's Notes

  1. Figure 2.2
  2. Figure 2.4
  3. Figure 2.5
  4. Figure 2.6
  5. Figure 2.8
  6. Figure 2.13
  7. Figure 2.14
  8. Figure 2.15
  9. Figure 2.17
  10. Figure 2.18
  11. Figure 2.19
  12. Figure 2.22
  13. Figure 2.27
  14. Figure 2.29
  15. Figure 2.31
  16. Figure 2.32
  17. Figure 2.36
  18. Figure 2.37
  19. Figure 2.40
  20. Figure 2.41
  21. Figure 2.42
  22. Figure 2.44
  23. Figure 2.45