Class Session: Monday Apr 01, 2019
Task 5.01 will be introduced in this class.
A database should have a separate table for every major component of the database
Data should not be duplicated in multiple tables
|ERModel entity set||composed of entities||which have attributes|
|Access tables||composed of records||which have fields|
|Excel worksheets||composed of rows||which have column header cells|
For example, in a library database, authors and their details might be a record in an Authors table
Each row contains a record which is a single entry in a table and each record is composed of several descriptive fields.
Each column contains a field (aka field name; column heading) which is a column label describing the type of information in the column. A field is a single kind of fact that may apply to each person, event, or other record.
When creating your own databases, sketch out the different tables you will need and the data contained in the tables before you begin
(It is not necessary to sketch out the tables that we will be importing because they are already the result of a design. They can be sketched out, as you will see in our relationships section, but it is a requirement included in the rubric for our project.)
You can import data from an Excel workbook (for example) by using the External Data tool which allows you to find the needed file type. (Older version screen shot)
Newer version screen shot:
This will start the import wizard that permits you to select the worksheets and the columns that you want to import.
The import wizard is very sensitive and often will not import data directly into an existing table because there may be an unseen formatting difference between the data in Excel and how it appears in Access
You will need to set up your Excel table header rows to match your Access table fields
Once you have created a new table, view the new table in design view
Automatically increments; used for primary key (unique identifier)
Numbers are integers that are negative or positive.
Numbers are not numbers that do not have numeric values (like SSANs or PIDs)
Used for words or non-value numbers; default setting; 255 characters max
Dollar or other currency amounts, with choice of decimal places
Dates & times
for Lookup tables
To distinguish one record from another, tables contain a primary key field
In Design View, click the "Primary Key" icon in the desired field.
all field types except AutoNumber and OLE Object have the following properties
number of characters, max is 255 (except for Memo)
how the field's contents will be displayed
option appears when data type is numeric
limits formats that can be entered (zip code, phone number, etc.)
Should it be stored in the database in a specified format?
label that will be attached to the field on a form or report. Can be different than the actual field name
default for new entries
a range of acceptable entries; checks values
appears in status bar when field is selected
a yes/no field that indicates if a value is mandatory
a yes/no type setting that indicates whether a text string with no length ("") is valid
creates an index for the field; improves searching & sorting
You can edit in either Design View or Datasheet view, however, the only place to make permanent changes is in Design View.
As in Excel, you can use functions in Access. For example, you can use functions in forms, reports, the design of tables, etc.
Functions have the same format as in Excel
Also, you can use the expression builder to build a function. For example,
generates the current date. [You need to include the parentheses, ().]
generates a date that is 30 days from the current date