Download presentation
Presentation is loading. Please wait.
Published byBrianne Paul Modified over 8 years ago
1
Microsoft Access 2013 ®® Tutorial 9 Using Action Queries and Advanced Table Relationships
2
XP Objectives Session 9.1 – Create an action query to create a table – Create action queries to append, delete, and update data Session 9.2 – Define many-to-many and one-to-one relationships between tables – Learn about joining tables – Join a table using a self-join – View and create indexes for tables New Perspectives on Microsoft Access 20132
3
XP Using Action Queries and Advanced Table Relationships Case - Chatham Community Health Services Enhancing User Interaction with the Health Database User wants to enhance the database by creating some advanced queries and integrating more tables into the database Tasks include: Creating Action Queries Creating relationships between database tables Defining M:N and 1:1 Relationships Between Tables Joining Tables Using Indexes for table fields Viewing existing indexes New Perspectives on Microsoft Access 20133
4
XP Using Action Queries and Advanced Table Relationships (Cont.) New Perspectives on Microsoft Access 20134
5
XP New Perspectives on Microsoft Access 20135 Using Action Queries and Advanced Table Relationships (Cont.)
6
XP New Perspectives on Microsoft Access 20136 Using Action Queries and Advanced Table Relationships (Cont.)
7
XP New Perspectives on Microsoft Access 20137 Using Action Queries and Advanced Table Relationships (Cont.)
8
XP Action Queries New Perspectives on Microsoft Access 20138 Action Query – A query that adds, changes, or deletes multiple table records at a time – Make Table Query Creates a new table by copying records from one or more existing tables – Append Query Adds records from existing tables or queries to the end of another table – Delete Query Deletes a group of records matching the criteria you specify from one or more tables
9
XP Action Queries (Cont.) New Perspectives on Microsoft Access 20139 History Table – Contains data that is no longer needed for current processing but that you might need to reference in the future
10
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201310 Creating a Make Table Query
11
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201311
12
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201312
13
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201313
14
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201314 Creating an Append Query
15
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201315
16
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201316
17
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201317 Creating a Delete Query
18
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201318
19
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201319
20
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201320
21
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201321 Creating an Update Query
22
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201322
23
XP Action Queries (Cont.) New Perspectives on Microsoft Access 201323
24
XP Relationships Between Database Tables New Perspectives on Microsoft Access 201324
25
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201325
26
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201326
27
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201327
28
XP Many-to-Many Relationships – Abbreviated M:N – When you have a many-to-many relationship between two tables, you must create a third table, known as a relationship table, and form one-to many relationships between the two original primary tables and the relationship table – When you join tables that have a many-to-many relationship, you can extract data from them as if they were one larger table Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201328
29
XP One-to-One Relationships – Abbreviated 1:1 – Each record in the first table matches at most one record in the second table, and each record in the second table matches at most one record in the first table – An entity subtype is a table whose primary key is a foreign key to a second table and whose fields are additional fields for the second table Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201329
30
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201330
31
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201331
32
XP Defining M:N and 1:1 Relationships Between Tables Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201332
33
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201333
34
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201334
35
XP Joining Tables – Inner Join A join in which the DBMS selects records from two tables only when the records have the same value in the common field that links the tables – Outer Join A join in which the DBMS selects all records from one table and only those records from a second table that have matching common field values Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201335
36
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201336
37
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201337
38
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201338
39
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201339
40
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201340 – Self Join A table that is joined with itself Can be either an inner or outer join – Imagine a situation where there are multiple supervisors, and each of the supervisors also has a supervisor – Separate tables for supervisors would be very confusing – The supervisors are also employees, and thus the EmployeeID for a supervisor is entered in the SupervisorID field – This is a case where a self-join would be used
41
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201341
42
XP – Creating a Self Join Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201342
43
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201343
44
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201344
45
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201345 – Using Indexes for Table Fields An index is a list that relates field values to the records that contain those field values Access automatically creates and maintains an index for a table’s primary key
46
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201346
47
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201347
48
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201348 Viewing Existing Indexes
49
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201349 Creating an Index
50
XP Relationships Between Database Tables (Cont.) New Perspectives on Microsoft Access 201350
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.