What you have displayed is akin to a job skills table.
A person can have many skills
Many people have the same skill
For example,
a person may speak many languages.
Many people speak english (or french, or ...)
In your case, your relationship suggests...
One person has many identification types
Many people can have the same identification type
This is a many-to-many relationship
I am not sure of examples to use for identification types, but using my first example of skill set, it works like this...
tblEmployee
EmployeeID - pk
EmployeeLN - last name
EmployeeFN - first name
tblSkillp
SkillID - pk
SkillName
SkillLevel
tblEmployeeSkill
EmployeeID - fk to tblEmployee
SkillID - fk to tblSkill
DateAccessed - date
Primary key = EmployeeID + SkillID
Now with data
[tt]
tblEmployee
EmployeeID EmployeeLN EmployeeFN
1 Asimov Issac
2 Leguin Ursula
3 Jordan Robert
tblSkill
SkillID SkillName SkillLevel
1 TroubleShoot 1
2 TroubleShoot 2
3 TroubleShoot 3
4 BreakFix 1
5 BreakFix 2
6 BreakFix 3
tblEmployeeSkill
EmployeeID SkillID
1 3
1 2
2 1
2 3
3 2
3 2
[/tt]
So
Asimov is a level 3 trouble shooter and a level 2 break / fix.
LeGuin is a level 1 trouble shooter and a level 3 break / fix.
Jordoan is a level 2 for both trouble shooting and break / fix.
In this example, the tblEmployeeSkill is updated accordingly. There are several ways of implementing this in a form...
- Create a subform based on tblEmployeeSkill. If the subform is to be embedded in a form based on tblEmployee, EmployeeID is hidden and SkillID is set to a combo box pointing to tblSkill. If the subform is embedded in a form based on tblSkill, the SkillID is hidden, and EmployeeID becomes a combo box.
- Create a form on tblEmployeeSkill. EmployeeID is a combo box pointing to tblEmployee and SkillID is a combo box pointing to tblSkill.
Referencing your previous post and graphic...
1) The Identification Type does not seem to add much value as it stands. You can actually use a value list within a combo box.
2) EmpID in tblEmployeeIdentification is fine, but you have IdentificationType in tblEmployeeIdentification instead of the ID field from tblIdentification.
3) tblEmployeeIdentification has it's own ID (primary key). This may be necessary in some cases, but I suspect not in your situation. By making EmpID + Identification.ID as the primary key, you avoid creating duplicate records.
4) If you are dealing with identification, you may wish to use a couple of dates -- ValidUntilDate and DateEntered since old ID may have little value.
With this in mind...
tblEmployee
EmpID - pk
Emp_first
Emp_last
...etc
tblIdentification
IdentificationCode - pk
IdentificationName
Why use IndentificationCode instead of an ID? Using a string / text code allows you to use smart codes so that you will know the IdentificationName on sight based on the code. SSN = Social Security Number, PSPRT = Passport, etc.
tblEmployeeIdentification
EmpID - fk to tblEmployee
IdentificationCode - fk to tblIdentification
Primary key = EmpID + IdentificationCode
Sample data, similar to what LesPaul provided...
[tt]
tblEmployeeIdentification
EmpID IdentificationCode
1 SSN
1 PSPRT
2 SSN
2 DRVLICN
3 SSN
3 BRTHCERT
[/tt]
...Moving on, Dates
Well, what about validation dates? As dicussed, if you are capturing indentification numbers, it makes sense to capture meaningful date....
tblEmployeeIdentification
EmpID - fk to tblEmployee
IdentificationCode - fk to tblIdentification
ValidToDate - date
DateEntered - date
...Moving on, Two tables
PHV made an interesting comment on using two tables. The tblIdentification table has very little info on it.
In the sample data I provided, you can fairly easily guess what the indentification type is based on the IndentificationCode. So why even have a tblIdentification table? You can actually present the PickList by using a ValueList within the combo box.
Personally, I would keep the tblIdentification table. By using a code to identify the indentification document, you can exclue the tblIdentification from many of your queries -- you would see the code "SSN" instead of "Social Security Number". However, you still have a central point to reference for your combo boxes, and reports for the proper name.
You made an interesting point about what if the name of the document changes. Suppose "Social Security Number" -> "Social Insurence Number". At least two ways to handle this. Cascade updates in the relationship. Keep the SSN record, and enter a new record for the SIN number.
Enough rambling.
Richard