Primary Key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I have two tables in a database in which I want to somehow link their
i.d. numbers. In other words, I want to relate the numbering columns in the
two tables so that there are no duplicates. Is this possible?

The two tables are: one for all external applicants, and one for internal
applicants. The applicant information of who is hired, in both tables, is
then pooled into a subdatasheet. Thank you!
 
hi,
The two tables are: one for all external applicants, and one for internal
applicants. The applicant information of who is hired, in both tables, is
then pooled into a subdatasheet. Thank you!
If there is no other difference between these two tables than that they
are storing internal or external applicants, then it is wrong to use two
tables. Just use a flag (boolean field, yes/no) to store it.

Otherwise you need to restructure it a little bit.

First step:
Create on table "Applicant" to store the IDs and the fields which both
groups have in common.

Applicant: ID, AppName, DOB, ...
ID is the primary key.

Second step:
Create for each group a table "AppInternal" and "AppExternal". These two
tables store the differend fields.

AppInternal: ID, Applicant_ID, IntJob,...
AppExternal: ID, Applicant_ID, ExtJob,...
ID is the primary key.
Application_ID is the foreign key to Application.ID.


mfG
--> stefan <--
 
I want to relate the numbering columns in the two tables so that there are no duplicates. Is this possible?
To prevent duplicates from being entered into a table, INDEX the field(s). You can do this by modifying the table design...
Click on the button in your table format toolbar that looks like a lightning bolt.
 
Back
Top