|[B]omakase wrote on Fri, 22 June 2007 09:27[/B]|
Ok thank you! Do I not want to force uniqueness of uid in profiles though? Is this worthwhile? Would it then be accomplished through a primary key or a unique key?
Decide if there is a one-to-one mapping between users and profiles table. Im guessing there might be, in that for each row in users, there is only one row in profiles?
If thats the case, then set profiles.userid to be PRIMARY KEY. This obviously forces uniqueness.
It can also be a FOREIGN KEY into the users table (which normally wouldnt, in itself, enforce uniqueness)