Tables
Let's say we want to store the contents of our address book.Stored ProceduresWe would start by creating a table. The table would contain fields (columns) for each part of the address from our book:
First NameEach row in the table contains the information for a particular person.
Last Name
Street Address
City
State
Zip Code
Phone NumberMany people use Microsoft Excel, a spreadsheet program, for storing addresses. Looking at a spreadsheet in Excel is very much like looking at a table in a database because they both have rows and columns for storing data.
A stored procedure, at it's simplest, is the same as a query (we'll get into queries and SQL in more detail in a future lecture). The query is stored as part of the database, so it actually runs faster. A query has to be interpreted and compiled by the database before it can be run. A query stored in the database is stored in an interpreted/compiled state, so that part of the work is already done.Other ObjectsMicrosoft Access does not have stored procedures, it simply stores queries. A stored procedure can be much more than a query - it can contain programming code as well! However, this can only be done in "real" databases like Oracle or SQL Server.
Microsoft Access contains other objects besides Tables and Queries (Stored Procedures). It also contains Forms, Reports, and Code Modules.