class - Unique keys mean they are primary keys? -


a booking made single customer , can make several bookings. each room in .a booking can occupied 1 or 2 customers. customer can occupy several. rooms. meal in booking assigned table through tablenumber attribute. the attribute combination name , telephonenumber unique , attribute roomnumber unique.

does unique key means primary key? mean both name , telephonenumber primary keys?

enter image description here

additional question:

can same key foreign key , primary key in table?

does unique key means primary key?

no. first of all, every key unique, therefore saying "unique key" on "key" redundant. keys in same table logically equivalent, convenience , historical reasons single out 1 of them , call "primary", while rest called "alternate".

does mean both name , telephonenumber primary keys?

no, there no 2 keys here (much less 2 primary keys). there 1 composite (aka. "compound", "complex") key, comprised 2 fields, happens primary.

whether that's good key matter...


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -