34
Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

  • View
    229

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Chapter Extension 6

Using Microsoft Access

© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Page 2: 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?

Page 3: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 4: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-4 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

PROSPECT Data

Table 1 CE6-2

Page 5: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-5 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

WORK Data

Table 2 CE6-2

Page 6: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-6 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Starting in Access

Figure CE6-3

Page 7: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 8: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-8 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Naming the Database

CE6-4

Page 9: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 10: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-10 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Adding Attributes

Figure CE6-5

Page 11: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 12: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-12 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Adding Information

Figure CE6-6

Page 13: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 14: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-14 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Relationships Window

Figure CE6-9

Page 15: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 16: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-16 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Creating the Relationship (continued)

Figure CE6-10

Page 17: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-17 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Enforcing Referential Integrity

Figure CE6-11

Page 18: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-18 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Entering Data

Double-click on table name Table appears Enter values into cells

Page 19: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-19 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Tables with Data Entered

Figure C6-12

Page 20: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 21: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 22: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-22 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Selecting First Table Using Form Wizard

Figure CE6-14

Page 23: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-23 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Selecting Second Table Using the Form Wizard

Figure CE6-15

Page 24: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-24 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Data Entry Form

Figure CE6-16

Page 25: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 26: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-26 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Generating Queries

Figure CE6-18

Page 27: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-27 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Generating Queries (continued)

Figure CE6-19

Page 28: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 29: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-29 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Creating a Query (continued)

Figure CE6-20

Page 30: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-30 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Query Results

Figure CE6-21

Page 31: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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

Page 32: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-32 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Selecting Table to Create Report

Figure CE6-23

Page 33: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

CE 6-33 © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

Report

Figure CE6-24

Page 34: Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke

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?