Professional Documents
Culture Documents
Kroenkes
Database Processing:
Fundamentals, Design, and Implementation
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-2
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
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 dont work as well
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall A-4
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-5
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
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall A-6
Creating a Database
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-7
Creating a Table
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-8
(1) Type in Field Name (2) Select Data Type (3) Add a Description (4) Modify Data Type properties on General Page
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-9
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-10
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-11
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-12
Type data into each cell. This is just like using a spreadsheet.
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall A-13
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-14
David M. Kroenkes
Database Processing:
Fundamentals, Design, and Implementation
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-16
Select fields from Available Fields by using the Select Field [>] and Select All Fields [>>] buttons
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall A-17
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-18
Creating Queries
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-19
Creating Queries
Add tables to the query
Select fields from table fields by drag and drop the * symbol means all fields
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-20
Creating Queries
To run the query, use the menu command Query | Run or the button
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-21
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-22
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-23
David M. Kroenkes
Database Processing:
Fundamentals, Design, and Implementation
Creating Relationships
To create relationships between tables, use the menu command Tools | Relationships. When the Show Table dialog box appears, select the tables STUDENT, CLASS and GRADE. MS Access places the tables in the Relationships Drag StudentNumber from window. STUDENT to StudentNumber in GRADE.
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-28
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
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall A-29
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-30
DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall
A-31