chapter extension 6 using microsoft access © 2008 pearson prentice hall, experiencing mis, david...
Post on 22-Dec-2015
229 views
TRANSCRIPT
Chapter Extension 6
Using Microsoft Access
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
CE 6-2 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Study Questions
How do I create tables? How do I create relationships? How do I create a data entry form? How can I create queries using the query
design tool? How do I create a report?
CE 6-3 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
How Do I Create Tables?
Create data model from users’ requirements Transform model into database design
– Primary key– Foreign key– Rows – Columns
CE 6-4 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
PROSPECT Data
Table 1 CE6-2
CE 6-5 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
WORK Data
Table 2 CE6-2
CE 6-6 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Starting in Access
Figure CE6-3
CE 6-7 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Creating a Database with Access
Go to New File on right-hand side of screen Select Blank database Provide file name Give location Press Enter
CE 6-8 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Naming the Database
CE6-4
CE 6-9 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Creating Tables
Select Create table in Design view Screen has two parts
– Upper part Enter name of each attribute (Fields) Enter Data Type Enter Description
– Bottom part Set properties of each attribute
CE 6-10 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Adding Attributes
Figure CE6-5
CE 6-11 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Creating Tables (continued)
Enter Field Names Enter Data Types Establish lengths Select primary key Save table Name table
CE 6-12 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Adding Information
Figure CE6-6
CE 6-13 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
How Do I Create Relationships?
Defining relationships– Go to Tools– Select Relationships
Window opens Show Table dialog box displayed Double-click on names of tables Tables added to Relationships window Close Show Table dialog box
CE 6-14 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Relationships Window
Figure CE6-9
CE 6-15 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Creating the Relationship
Click on the attribute in one table DRAG it on top of the attribute in the second table A dialog box appears Click Enforce Referential Integrity Click Cascade Update Related Fields Click Cascade Delete Related Fields Close Relationships window Save changes
CE 6-16 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Creating the Relationship (continued)
Figure CE6-10
CE 6-17 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Enforcing Referential Integrity
Figure CE6-11
CE 6-18 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Entering Data
Double-click on table name Table appears Enter values into cells
CE 6-19 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Tables with Data Entered
Figure C6-12
CE 6-20 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
How Do I Create a Data Entry Form?
Use the default table display– Displays related records– Limited capability– Interface not pleasing
Use Access Form Wizard– Click on Forms– Double-click on Create form– Select table from Tables/Queries combo box– Double-click on double chevron button
CE 6-21 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
How Do I Create a Data Entry Form? (continued)
– Go back to Tables/Queries– Select second table– Double-click on double chevron button– Select Finish
Access will automatically connect rows in first table with the matching rows in the second table
Add, update, delete data in forms
CE 6-22 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Selecting First Table Using Form Wizard
Figure CE6-14
CE 6-23 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Selecting Second Table Using the Form Wizard
Figure CE6-15
CE 6-24 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Data Entry Form
Figure CE6-16
CE 6-25 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
How Can I Create Queries Using the Query Design Tool?
Access processes SQL query language Provides graphical interface to create queries
– Generates SQL statement
Creating queries– Click Queries– Double-click Create query in Design view– Double-click on tables’ names– Access places tables into query design form– Access remembers relationship
CE 6-26 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Generating Queries
Figure CE6-18
CE 6-27 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Generating Queries (continued)
Figure CE6-19
CE 6-28 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Creating a Query
Drag columns from tables into grid– Lower part of query definition form
Click red exclamation point icon Access will show rows that have value
matches in all tables Save
CE 6-29 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Creating a Query (continued)
Figure CE6-20
CE 6-30 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Query Results
Figure CE6-21
CE 6-31 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
How Do I Create a Report?
Select Reports Double-click Create report by using wizard Select table in Table/Queries combo box Highlight name Double-click single chevron You can add additional items the same way Click Finish
CE 6-32 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Selecting Table to Create Report
Figure CE6-23
CE 6-33 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Report
Figure CE6-24
CE 6-34 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Active Review
How do I create tables? How do I create relationships? How do I create a data entry form? How can I create queries using the query
design tool? How do I create a report?