08-11-2008, 10:12 PM
[eluser]Ciaro[/eluser]
Hi there.
I was wondering, how do you guys name your tables and columns (fields) in MySQL/MSSQL?
I've been doing some googling, but there are just too many different approaches. I'm yet to figure out a consequent way that suits me best.
Should I use id or tablename_id as primary key? What about foreign keys? Singular or plural table names? Short or long table names? tablename_fieldx or just fieldx?
I currently already have made up my mind about following things:
'lowercase' all the way
underscores above CamelCase
--
Thanks.
Hi there.
I was wondering, how do you guys name your tables and columns (fields) in MySQL/MSSQL?
I've been doing some googling, but there are just too many different approaches. I'm yet to figure out a consequent way that suits me best.
Should I use id or tablename_id as primary key? What about foreign keys? Singular or plural table names? Short or long table names? tablename_fieldx or just fieldx?
I currently already have made up my mind about following things:
'lowercase' all the way
underscores above CamelCase
--
Thanks.