31
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall A-1 David M. Kroenke’s Appendix A: Introduction to Microsoft Access Part One Database Processing: Fundamentals, Design, and Implementation

App A Powerpoint database home work test notes for chapter 3

Embed Size (px)

DESCRIPTION

Notes from College course homework for networking class, tests bank is included.

Citation preview

Page 1: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-1

David M. Kroenke’s

Appendix A:

Introduction to

Microsoft Access

Part One

Database Processing:Fundamentals, Design, and Implementation

Page 2: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-2

Example Database DesignThree tables: STUDENT, CLASS and GRADE

Page 3: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-3

MS Access – Basic Data Types

• Text• Memo• Number

– Byte– Integer– Long Integer– Single– Double– Decimal

• Date/Time• Currency• Yes/No• AutoNumber

Page 4: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-4

MS Access – Table Keys

• Each table has a key• A key is one or more columns that identify a row:

– StudentNumber in STUDENT– ClassNumber in CLASS

• Keys composed of more than one column are called composite keys:– (StudentNumber, ClassNumber) in GRADE

• See Chapter Three for a complete discussion of keys.• In this Appendix, the following keys are relevant:

– Primary key – The key used to identify rows in a table– Foreign key – The key used to link to another table– Surrogate key – A short, numeric key added to the table as an

ideal identifier when other fields don’t work as well

Page 5: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-5

Example Database Design

Page 6: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-6

MS Access - Relationships

• StudentNumber in GRADE creates a relationship to StudentNumber in STUDENT

• ClassNumber in GRADE creates a relationship to ClassNumber in CLASS

• StudentNumber in GRADE and ClassNumber in GRADE are examples of foreign keys

Page 7: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-7

Creating a Database

UseCreate a new file…

to create a database

Page 8: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-8

Creating a Table

UseCreate table in Design View

to create a table

Page 9: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-9

Creating Columns (Fields)

(1) Type in FieldName

(2) SelectData Type

(3) Add a Description

(4) Modify Data Type properties on General Page

Page 10: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-10

The STUDENT Table Definition

Page 11: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-11

The CLASS and GRADE Tables

Page 12: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-12

Adding Data to Tables

• We can add data to a table by:– Using the datasheet view, or– Using a form

Page 13: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-13

Adding Data to Tables:Using the Datasheet View

Type data into each cell.This is just like using a

spreadsheet.

Page 14: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-14

David M. Kroenke’s Database Processing

Fundamentals, Design, and Implementation

(10th Edition)

End of Presentation:Appendix A Part One

Page 15: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-15

David M. Kroenke’s

Appendix A:

Introduction to

Microsoft Access

Part Two

Database Processing:Fundamentals, Design, and Implementation

Page 16: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-16

Adding Data to Tables:Using a Form

UseCreate form by using wizard

to create a form

Page 17: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-17

Adding Data to Tables:Using a Form

Select fields from Available Fields by using the Select

Field [>] and Select All Fields [>>] buttons

Page 18: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-18

Adding Data to Tables:Using a Form

Type data into each field on the form

Page 19: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-19

Creating Queries

UseCreate query in Design view

to create a query

Page 20: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-20

Creating Queries

Add tables to the query

Select fields from table fields by “drag and

drop” – the * symbol means “all fields”

Add criteria to determine which rows

are selected by the query

Page 21: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-21

Creating Queries

To run the query, use the menu command Query | Run or the button

Page 22: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-22

Viewing MS Access SQL

To see the SQL version of the query, use the menu command View | SQL or the SQL button on the View drop-down list:

Page 23: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-23

David M. Kroenke’s Database Processing

Fundamentals, Design, and Implementation

(10th Edition)

End of Presentation:Appendix A Part Two

Page 24: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-24

David M. Kroenke’s

Appendix A:

Introduction to

Microsoft Access

Part Three

Database Processing:Fundamentals, Design, and Implementation

Page 25: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-25

Creating Relationships

To create relationships between tables, use the menu commandTools | Relationships. When the Show Table dialog box appears, select the tables STUDENT, CLASS and GRADE. MS Access places the tables in the Relationships window.

Drag StudentNumber from STUDENT to

StudentNumber in GRADE.Check Enforce Referential

Integrity.

Page 26: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-26

Creating Relationships:The Competed Relationships

The symbols“1” and “”indicate a

One-to-Many [1:N] relationship

Page 27: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-27

Creating Multitable Forms

(1) As before, use Create form using wizard: Choose CLASS as the first Table/Query and add all available fields

(2) Select the GRADE Table

(3) Add only the fields StudentNumber and Grade using the [>] button

Page 28: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-28

Creating Multitable Forms:The Final Form

Fields from CLASS

Fields from GRADE

Page 29: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-29

Creating a Report

(1) Click Reports in the Objects list.

(2) Use Create report by using wizard.

(3) Select:

CLASS: All fields

GRADE: StudentNumber, Grade

STUDENT: StudentName

Page 30: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-30

Creating a Report:The Finished Report

(4) Click the wizard’s Finish button, and the finished report appears:

Page 31: App A Powerpoint database home work test notes for chapter 3

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

A-31

David M. Kroenke’s Database Processing

Fundamentals, Design, and Implementation

(10th Edition)

End of Presentation:Appendix A Part Three