I was just wondering what the concensus was on tables that have one field and that field is the primary key.
Example:
The id field in the roles table would be values like "Quality Control" and "Administrator". Since these values will always be unique, I could use it as the primary key rather than using an auto-increment id with a second field labelled "name".Code:Users ----------------------------------- id | username | password | roles_id ----------------------------------- Roles --------------------------- id ---------------------------
My question is, is this good design practice?



Reply With Quote






Bookmarks