Hi guys,
A little database design question:
In general does it make sense to name your "id" fields just "id", or something like "cust_id" and "emp_id" (for employee). It seems that if you just used "id", things would not only be confusing, but a pain in the butt!
If you joined the two tables, and did a "SELECT * FROM", you would always need to alias the fields (employees.id as emp_id) so that you could efficiently access the data.
However, if you renamed the fields to cust_id and emp_id, and joined the tables, no such renaming would be necessary.
Does that make sense? Are there any detrimental side affects that I am missing?
Thanks in advance,
jbubrisk
A little database design question:
In general does it make sense to name your "id" fields just "id", or something like "cust_id" and "emp_id" (for employee). It seems that if you just used "id", things would not only be confusing, but a pain in the butt!
If you joined the two tables, and did a "SELECT * FROM", you would always need to alias the fields (employees.id as emp_id) so that you could efficiently access the data.
However, if you renamed the fields to cust_id and emp_id, and joined the tables, no such renaming would be necessary.
Does that make sense? Are there any detrimental side affects that I am missing?
Thanks in advance,
jbubrisk