AIA101.1.MS Access Tables & Data

  • 1,782 views
Uploaded on

1st Module of Accelerated Introduction to Microsoft Access. covers tables, import/export and relationships

1st Module of Accelerated Introduction to Microsoft Access. covers tables, import/export and relationships

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
1,782
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
1
Likes
7

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Accelerated Introduction to Access Module Introduction to Access, Tables, and External Data P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com [email_address]
  • 2. Module Outline
    • Part 1: Introduction & Tables
    • Part 2: External Data
    • Part 3: Relating Tables
    Three parts:
  • 3. Module Hands On
      • Create working folder with supplied files
      • Create a database
      • Create 3 tables (w/validation rules and masks)
      • Populate tables
      • Import and Export Tables
      • Create permanent links
      • Create a simple query
      • Compute calculated field(s)
      • Create a multi-table query with summary aggregates
    • Students “hands-on”:
  • 4. Accelerated Introduction to Access Part 1: Introduction to Access and Tables
  • 5. But first - Create Folder
    • Create a folder yourname (or similar) in My Documents – this is where your database and other files will go.
    • Optionally, copy in the labor.txt and employees.xls files from the instructor supplied location or CD.
  • 6. Access Modes
    • Menu-driven interface - Interact with a database and its objects using menu commands
    • Program mode - Lets you store instructions in a VBA program file
    • This course concentrates on the menu interface but does cover macros which can be used to “program” a series of actions
  • 7. Database Terminology
    • Database – in Access a repository in which tables, reports, queries, and other objects are stored
    • Table – stores facts about one subject (entity)
    • Record - contains related information about an entity “instance”
    • Field - contains a fact about an entity
    • Relational Database - allows you to link records from two or more tables based on the contents of a common field. Access is a relational database.
  • 8. Database Terminology (cont.)
    • Key - used to order, identify, and retrieve records in the database
    • Primary key - unique identifier for a particular record. Only one per table.
    • Index – like a book index. Speeds searches and joins. Can have many per table.
    • Table structure - the arrangement of information within a record, the type of characters, field length, limitations, etc.
  • 9. Database Terminology (cont.)
    • Object – used in database world as generic term for queries, reports, indexes, tables, etc. Not the same as programming object.
    • Form - paper-like method of accessing and entering data in a table
    • Query – retrieves information from Access tables
    • Report - provides the ability to arrange table data as well as to perform calculations and then print a paper-based report
  • 10. Sample Application – Factory2000
    • Simple cost accounting application
    • Employees work on work orders
    • Clock labor hours for each work order
  • 11. Recording Factory2000 Labor Hours What problems do you see with this approach? 15 Ass’ly B3 25 Parks Alicia 14 18 22 12 Hours Screws Casting Casting Descr C2 A1 A1 Wono 25 20 15 Rate Parks Chavez Smith lName Alicia Mary Bob fName 14 13 12 EmpNo
  • 12. Factory2000 Relational Database Structure employees Labor Work_orders 25 20 15 Rate Parks Chavez Smith lName Alicia Mary Bob fName 12 14 13 13 12 MgrNo EmpNo 1/1/01 2/1/01 1/1/01 Start 2/28/01 2/28/01 1/31/01 End B3 C2 A1 Wono 40 14 42 14 20 12 Hours EmpNo Screws Fitting Casting Descr 70 C2 50 B3 30 A1 Std Wono
  • 13. Creating a Database
    • Ways to create a database
      • Create a database using an Access template or Wizard – (not always recommended)
      • Create a blank database and then insert your own objects – we will use this method in this course
  • 14. Creating an Access 2000 Database Create the database in your desktop folder with a meaningful name
  • 15. Creating a Table
    • Click new from tables tab
    • Naming a Table
      • Up to 64 “standard” characters can be used
      • Do not use an extension
      • No leading spaces or control characters, in fact try to avoid spaces altogether
    • Add fields one by one
    • Set Field Properties in Field Properties box
  • 16. Designing Fields
    • Field Type – text, datetime, number, etc.
    • Field Width – 10 characters, etc.
    • Caption – “Column title” for display
    • Format – Determines how the field is displayed (long date, short date, etc.)
    • Click toolbar key symbol to make primary key
    • Set indexed for secondary keys, required, etc.
  • 17. Setting Properties in the Table Designer
  • 18. Hands On - Create Tables
    • Employees
    • Work_Orders
    • Labor
  • 19. Employees Table Definition
    • EmpNo text(2), primary key
    • Fname text(10)
    • Lname text (15), required
    • Rate currency, required
    • MgrNo text(2)
    (Instructor led) All with captions Save as tblEmployees
  • 20. Work_Orders Table Definition
    • WoNo text(2), primary key
    • Descr text(15)
    • StdHrs number(single,2), required
    • Accum number(single,2), required
    (On your own) Add captions, too Save as tblWork_orders
  • 21. Labor Table Definition
    • EmpNo text(2), primary key
    • WoNo text(2), primary key
    • Start datetime, required
    • End datetime
    • Hours number(single,2)
    (On your own) Add captions, too Save as tblLabor
  • 22. Field Validation & Masks
    • Add some validations
      • Test a numeric field for > 0
      • Try checking one field against another
      • Etc.
    • Add captions if not added already
    • Add an input mask
    • Change a display format
    • Etc.
  • 23. Datasheets
    • Datasheet window - displays the contents of a table in a spreadsheet-like format
      • Each row contains a record
      • Each column contains a field
    • Speedbar - appears at the bottom of the window and is used to navigate through the records in a table
  • 24. Datasheet View
  • 25. Entering & Editing Records
    • Enter table data from the handouts or use your own data
  • 26. Employees Table Data
  • 27. Work_Orders Table Data
  • 28. Labor Table Data [To be imported later]
  • 29. Printing a Table
    • Access allows you to create “quick and dirty” reports by clicking the toolbar Print button
      • A row/column presentation is used
      • Field names appear along the top
      • Records are rows
      • Fields are columns
      • A grid is printed around each field
  • 30. Quick Reports
    • Report Wizard
      • Module 2 covers reports
      • For now, be aware a quick report can be produced using the report wizard
  • 31. Microsoft Access Part 2 External Data
  • 32. Office Links
    • Publish it with MS Word
    • Analyze in MS Excel
    • Use Tools | Office Links or the Toolbar
  • 33. Exporting a table
    • Very simple
    • Click File|Export (or save as)
    • Specify type: Access can export to many types: Excel, Text, etc.
  • 34. Exporting tables
    • Export Work_Orders to CSV text file.
    • Note you can also export to another Access table. Even one elsewhere on a LAN!
  • 35. Using External Data
    • Two methods:
      • Import the data into a new (or existing table) in your database
      • Link to the data. A table link appears in your database but the data stays in the original file .
  • 36. Importing Files
    • Another very important feature
    • Start from new table dialog, pick Import Table
    • It will start a wizard
    • Use advanced to select fields, etc.
    • Specifications can be saved for later use
  • 37. Importing a table from a Text File Importing a Text File
  • 38. Importing from a text file
    • Import the instructor-supplied labor text file into the previously created labor table
    • Save the specification
  • 39. Linking a table
    • Use new table dialog
    • Select Link Table
    • This will set up a connection to an external table. It does not become part of the Access database
    • Access can link to many types: Excel, ODBC connection, etc.
  • 40. Linking a table Linking a Table
  • 41. Link a table
    • Link the instructor-supplied Employees Excel
    • Give it a name like Employees_xls
  • 42. Microsoft Access Part 3 Relating Tables
  • 43. Relating Tables
    • Command sequence – Tools | Relationships
    • Parent table - table used as the main table for a relationship
    • Child table - the related table, often has several records for each record in the parent table
  • 44. Referential Integrity
    • Orphan record - a child record without a corresponding parent record
    • Referential integrity - makes certain that related records are present
  • 45. Table Links
    • In this context means relate two or more tables on columns of data
    • Permanent link –
      • established using the Relationships command
      • is always in effect once defined
    • Transient link - defined using the query-by-example feature of Access
  • 46. Creating a Permanent Link Drag from PK to FK
  • 47. Create Permanent Links
    • Link all Factory2000 tables
    • Enforce referential integrity
    • Normal, default joins for now
  • 48. Permanent Links
  • 49. Import Labor Table
    • Now import the instructor supplied labor.txt file into your labor table
    • Try changing an EmpNo or WoNO to an invalid value and see what happens
  • 50. Accelerated Introduction to Access End of Module P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com [email_address]