Multiple ID's in database
- by eric
I have a database that contains a few tables such as person, staff, member, and supporter.
The person table contains information about every staff, member, and supporter. The information it contains is name,address,email, and telephone. I also created an id that is the primary key.
My issue is that I also have an primary key ID for staff, member, and supporter.
For instance, in the person table is John with id 1.
He is a supporter so in the supporter table is pID(for person id)to reference back to John with all his information and ID(for supporter ID).
pID references to the person table and every person has an ID incremented by 1 starting at 1. supporter ID is for every supporter and also starts at 1 and is incremented by 1.
Is it possible to have in the supporter table pID = 1 and supporter ID = 1? Another person may have a pID = 26 and supporter ID = 5.
Or will supporter ID have to be different than the pID and be something like "sup"? So you would have pID = 1 and supporter ID = sup1 or pID = 26 and supporter ID = sup5