To your keyboards.
START ACCESS!
And, because you want to learn something from the ground up, you
won't use the wizards, pages and projects which are the database-creation templates.
Once you've mastered the concept, then you can use the shortcuts and let Access guide you through the process.
And again, to make it interesting, just choose General Database.
Choose a name for the database and store it in a folder.
In Access, a database, no matter how many tables or forms or reports it contains, is stored in a single file. That file has the extension: .
mdb (for
Microsoft
data
base). When you want to move or copy or delete the database, all you have to do is work with the one file.
So far, you have an empty database.
The first object you create to define the database is the
table.
A table is the description of an entity. It is used to store the data. When you create the table you first describe its
structure.
A table in Access is sort of like a spreadsheet in Excel: it consists of rows and columns. Only, it is more organized than a spreadsheet and that organization will later allow you to retrieve the data in all kinds of ways.
The
design view of the table is meant to define the
structure.
You name all the columns (in technical jargon they would be called
attributes of the entity). Remember to use the prefix for the table, in this case
c_ because it's the
Customers table.
Then, choose a
Data Type for each column.
The Data Type defines what kind of data will be contained: text, numbers, URL, dates, etc. This lets the system know how much memory to reserve and also, what you are allowed to do to the data. For example, if you specify that a column is a "Number" type, you won't be allowed to put "XYZ" in it.
To see the data types available, click on the Data Type column and do F1 (the Help function). Here's what you should get:
And here are the basic rules on how to use them:
- When you define a primary key field and it doesn't matter what the format is, use AutoNumber. If the identifier is formatted, like A9-1234, use Text.
- When the data is a date of any kind, Date of birth, Date hired, Invoice date, etc., you have to use the Date/Time data type.
- Most fields will be Text. Even a phone number (it contains a dash), or department number that happens to be 101.
- Use Number only for fields that will be used in calculations (+ - * / ) like quantities or salaries. If it does not have to be calculated, use Text. Even if the Department_number is 101, define it as text: it's not the number one hundred and one, it's the characters "1""0""1". Believe me, it will make your life easier.
- Use Memo when the Text field may be too big. If you are doing a Patients table for a Doctor, the Diagnosis field should be Memo.
- Whenever a field has only a yes/no answer, use the Yes/No type. For example: Paid?, Member?, Active?