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