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
Post a Comment