Download presentation
Presentation is loading. Please wait.
1
BUS2206 Access Lab Queries Second Term,
2
Part I Introduction
3
Introduction (Based on the Lab Textbook)
Creating Table (P. 13 – P. 17) Database schema Tables relationships (P. 20 – P. 22) Creating Queries (P. 17 – P. 37) QBE (Query By Example) Creating Reports (P. 37 – P. 42) Creating Forms (P. 46 – P. 48) For input control based on Tables and Queries
4
The Schema and Metadata
Chapter 7 The Schema and Metadata Schema: a plan that describes the structure of the database, including: Names and sizes of fields Identification of primary keys Relationships Data dictionary: a repository of information about the data and its organization Also called metadata: the data about the data
5
Employee Table Data Dictionary
6
Wage Table Data Dictionary
7
Hours Worked Table Data Dictionary
Composite Key
8
“Date” Input Mask Example
Date format is Medium Date, such as: 04-Oct-16 In order to ensure the input date is in correct format, access uses input mask to control the input data: 00\->L<LL\-00;0;_ Where, 0 is a mandatory digit; L must be a letter; > converts letter to upper case and, < converts letter to lower case; \ keep the next character as it is.
9
Enter Data for Tables
10
Chapter 7 Data Modeling Databases must be carefully planned and designed to meet business goals Data modeling: analysis of an organization’s data and identification of the data relationships. It develops a conceptual blueprint of the database. Entity relationship diagram: a graphical representation of all entity relationships
11
Data Modeling (continued)
Chapter 7 Data Modeling (continued) One-to-many relationship Many-to many-relationship
12
Create Table Relationships in Access
One-to many-relationship One-to-one relationship
13
Part II Queries
14
Create Query: Hourly Pay Employees (1)
15
Create Query: Hourly Pay Employees (2)
16
Query: New Hourly Pay Rate (1) P.17
17
Create Query: New Hourly Pay Rate (2)
18
Create Query: Join Two Tables (1)
19
Query: Join Two Tables (2)
20
Query: Citizen Hourly Pay (1) P.20
21
Create Query: Citizen Hourly Pay (2)
22
Query: Calculate Wages Pay in Week 2 (1) P.21
23
Query: Calculate Wages Pay in Week 2 (2)
24
Query: Count number employees (1) P.22
Step 2 Step 1 Step 3
25
Query: Calculate Wages Pay (2)
26
Better Title for Calculate Wages Pay (3)
27
“Total” Field Summary P.22
28
Query: Average Hourly Wage (1) P.25
29
Query: Average Hourly Wage (2)
30
Query of a query: New Avg Rate (1) P.26
31
Query of a query: New Avg Rate (2)
Calculated Field Select a query
32
Query of a query: New Avg Rate (3)
33
Query of a query: New Avg Rate (4)
34
Query: Date() Function (1) P.27
35
Query: Date() Function (2)
36
A new Table for Time Arithmetic(1) P.28
37
A new Table for Time Arithmetic(2) P.28
38
Query: Calculate Hours Worked (1) P.29
P.29 on why * 24
39
Query: Calculate Hours Worked (2)
40
Query: Update Records (1) P.30
41
Query: Update Records (2)
42
Query: Delete a Record (1) P.32
43
Query: Delete a Record (2)
44
Query: Delete a Record (3)
45
Parameter Query (1) P.32
46
Parameter Query ()
47
Query Exercise 1 P.33
48
Query Exercise 2 P.34
49
Query Exercise 3 P.35
50
Query Exercise 4 P.35
51
Query Exercise 5 P.36
52
Query Exercise 6 P.36
53
End of Access Query Lab
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.