so i'm still in the design phase of this database. Anyways, every person, whose PK is their name, has a FK to a contact table then I'm very confused as to what's next as every contact table contains a reference to the address table. Person -> Contact -> address Tables contain as follows:

PK | name
contact info references contact table (?)

PK | address(?)

PK | street name (?)

First Question: What would be the PK for my contact table? Second question: What would be the PK for my address table? Would it even have a PK or is it just referenced?

Essentially one person would have one entry into the contact table, then in the contact table it references the address table and I'm just trying to figure out the best way to do that.


1 Answer 1


Name - can't be considered a good candidate for primary key. Since, it can be duplicate/modified later. In your case, I don't see any natural key which can be used as primary key. Better, you can add/use a surrogate key(Serial No. -autoincrement) as primary key.

For address table: If you are also storing email address. You can create separate columns for email and postal address and make email address as primary key.

To reference Contact Info from Person table - you can use email address as foreign key into person table.

So, schema can be like below:

    S.N. : (Auto Increment) - Primary Key
    name :
    email : Foreign key

    email : Primary key
    Postal address 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.