Primary Key

G

GWEmp

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!
 
S

Stefan Hoffmann

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 <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top