One way of posting your tables is to show the name of the table, and then the
important fields, such as keys. I would post your Employees table like this:
tbl_Employees
SSN (PK)
EmployeeInfo (meaning names, birthdate. These don't usually have anything
to do with the actual relationship of the tables to each other, so I group
them under Info)
Notes inline
Okay, started on this and before I get too in depth, tell me if I am on the
right track. I've gotten 35 tables so far on the board.
35 tables does seem like a lot, but you probably have a lot of peripheral
tables in that, where information can just be looked up, thus saving a lot of
typing, and making your database well normalized.
Most of them are
simple, 2-3 fields with a FK (i.e. tblSex).
Another way of handling a field such as Gender (trying to be PC here), is to
simply use a field called Gender or Sex in your Employees table, and use a
Validation Rule and Validation Text to limit the choices. For a Gender
field, I would use a validation rule of: ="Male" Or ="Female" and also set
the field size to 6, and then use validation text of: Enter either Male or
Female. The reasoning behind this is, that you will probably never have to
worry about adding an additional gender to your Gender Table, so a repetition
of labels such as male and female isn't so bad. Another reason is, that once
you have put in the gender, the chances are very very slim that you would
have to change it. Especially in the military.
In the "main" tblEmployees, I
have only LName, FName, MI, SSN (as the PK) and DateOfBirth.
As mentioned above, you could probably get away with putting gender into
this table. Though I now question why you have a tbl_Sex, when there is no
SexID in your Employees table. If you do create a table for repetitive data,
which will have a primary key, then you need to reference that data by using
a foreign key in the table which will reference that repetitive data. So,
your Employee table would look like this:
tbl_Employees
SSN (PK)
GenderID (FK)
tbl_Gender
GenderID (PK)
GenderText
I think I'm on
the right track after reading the article and more on the web last night.
Remember, you are on a learning curve right now. We're only a few lessons
into this, so just relax and let these concepts sink in. If you can get your
tables done correctly from the start, you will do OK.
Question, though. In my draft version, tblSex had only one field with two
entries (Male and Female). I used this table as a combo box for the forms. I
am thinking I should be storing each persons sex in the table instead. But if
I do that, I would end up with a combo box of ???? So do I make two tables,
one to store the data and one to "drive" the cbo?
Tables are simply for storing data. They are just a big box that all of the
data gets dumped into. A combo box is used on a form to simplify entering
data, usually by looking up a list of possible values, which are then used in
the current record. Don't worry so much about your forms just yet. Keep
trying various things, but remember that once your tables are set up, many of
the forms will set up much easier.