Welcome Guest, Not a member yet? Register   Sign In
Naming tables and columns: best practices?
#1

[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.


Messages In This Thread
Naming tables and columns: best practices? - by El Forum - 08-11-2008, 10:12 PM
Naming tables and columns: best practices? - by El Forum - 08-11-2008, 10:20 PM
Naming tables and columns: best practices? - by El Forum - 08-11-2008, 11:04 PM
Naming tables and columns: best practices? - by El Forum - 08-11-2008, 11:43 PM
Naming tables and columns: best practices? - by El Forum - 08-12-2008, 12:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB