Databases with Microsoft Access Using Access to create Databases Jan-Feb 2003
What is a Database? An Organized collection of information about a subject. Examples: Address Book Telephone Book Filing Cabinet full of documents Pre-existing existing forms (hard copy) Employee information cards
What is Access? A database management system allowing users to input, edit, and verify data. It is a part of the Office 2000 suite Icon is a purple key
What makes up a Database? Records or Record Set A set of details about a specific item. Example Name Address Phone Number
What makes up a Record? Fields Provide the categories for the details describing each record. Fields are defined by data types The specific field data within a record is the field contents
In a Nutshell Database = collection of information Database is made up of records Records are made up of fields Fields are defined with data types that become field contents.
The Database Window Table Form Query Report Macro (not covered in this class) Module (not covered in this class) Page (if time and pertinent)
Tables All Access database information is stored in tables. Each row of an Access Table is a record Each column of an Access Table is a field Each column is headed by a field name The field contents is the specific field data within a record
Form A window for viewing the data in one or more tables. Makes it easy to view, input, and edit data on a single page. Another way to have users input data. The other way is the datasheet view.
Query A way to ask questions of the data Allows you to see or work with a portion of a table by limiting the number of fields and by selecting specific records. A way to filter information
Report Formatted information from a table or query that you can send to a printer. You can create labels via the Report Object.
Page Allows you to create Web-based based forms that allow users to input and read data from your database.
Field Data Types Text Memo Number Date/Time Currency AutoNumber Yes/No OLE Object Hyperlink Lookup Wizard
Text Text or combinations of text and numbers, such as addresses. Also numbers that do not require calculations, such as phone numbers, part numbers, or postal codes Size of field = up to 255 characters
Memo Lengthy text and numbers, such as notes or descriptions Size = up to 64,000 characters
Number Numeric data to be used for mathematical calculations, except calculations involving money. Size = 1,2,4, or 8 bytes
Date/Time Dates and Time Size = 8bytes
Currency Currency values. Use the Currency data type to prevent rounding off during calculations. Accurate to 15 digits to the left of the decimal point and 4 digits to the right. Size = 8 bytes
AutoNumber Unique sequential (incrementing by 1) or random numbers automatically inserted when a record is added. Size = 4 bytes
Yes/No Fields that will contain only one of two values, such as Yes/No, True/False, On/Off. Size = 1 bit
OLE Object Objects (such as Microsoft Word documents, Excel spreadsheets, pictures, sounds, or other binary data), created in other programs using the OLE protocol, that can be linked to or embedded in an Access table Size = up to 1 gigabyte (limited by disk space)
Hyperlink Field that will store hyperlinks. A hyperlink can be a UNC path or a URL. Size = up to 64,000 characters.
Lookup Wizard Creates a field that allows you to choose a value from another table or from a list of values using a combo box. Choosing this option in the data type list starts a wizard to define this for you. Size = typically 4 bytes
Primary Key The power of a relational database system such as Microsoft Access comes from its ability to quickly find and bring together information stored in separate tables using queries, forms, and reports. In order to do this, each table should include a field or set of fields that uniquely identifies each record stored in the table. This information is called the primary key of the table. Once you designate a primary key for a table, to ensure uniqueness, Microsoft Access will prevent any duplicate or Null values from being entered in the primary key fields.
So should I set a Primary Key? I would just to be safe. It creates an AutoNumber field automatically You might relate tables together in the future.
Input Mask This controls how the data is entered into a field in a table or a form. Common Input Masks are Social Security Number, Date/Time, Phone number, Zip code, Extension, Password. You can create your own Input Mask