mysql - relationships one to one -


i hope can me this. trying develop online admission system in php/mysql. have far created 2 tables:

1- member (memberid (auto increment), username, email, password, activation) 2- personal_details (nationality, religion, passport no, place of birth, date of birth)

i split data 2 tables reduce load on tables. can please tell me how define one-one relationship in such cases. thanks

you put memberid column on each table regular foreign key relationship. difference should put unique constraint or primary key constraint on both tables.

it's uniqueness constraint changes relationship 1:n 1:1 relationship.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -