Reputation: 319
If I name it username then I would have to write user_username when referring to my field when I can just write user_name if it's named "name". On the other hand, username sounds more appropriate than name.
Can someone help me make a decision?
Upvotes: 2
Views: 1231
Reputation: 12469
username, it's more specific and won't get mixed up with proper human names.
Here's a tip: while you're there, it's a good idea to decide on the proper name columns early - first_name and last_name or surname and given_name or whatever. It doesn't really matter, but it's a right pain when tables are inconsistent.
Upvotes: 0
Reputation: 839114
You should call it username
.
The field name
(or user_name
if you are prefixing all fields with the table name) is ambiguous because it might be their real name, which is usually different from their username.
Upvotes: 4