2 ms·
Why not something like orders.users_fk? Then you know exactly what that column is there for. It was intended to be a foreign key for the users table. I think
by bluefirebrand 4y ago
Why not something like
orders.users_fk?
Then you know exactly what that column is there for. It was intended to be a foreign key for the users table.
I think "orders.user_id" is fine too of course, I'm not going to argue against that. But isn't it just the tiniest bit more ambiguous?
Edit: There's probably also always better names than just the table name with id, too.
For example orders might have more than one fk to the users table, depending on the type of site. Something like ebay might have both buyer_id and seller_id on a single order.