Page 1 of 1

database , table, field , query naming/coding conventions ??

Posted: Thu Jan 18, 2007 9:45 pm
by PHPycho
i am eager to know the convention or standards used for naming database,table,fields.
Can anybody suggest here. i am always in dilemma in using for example
1> users or user , which table name is preferred
2>id or tableName_id , which should be preferred
etc etc.
Also it would be helpful to many if coding standards for sql query is also mentioned.
waiting for the results
hope for the best
Thanks

Posted: Fri Jan 19, 2007 8:04 am
by feyd
I typically use <applicationName>_<descriptiveTableName> for table names. "users" versus "user" doesn't really matter to me.

As for field identifiers, the same basic principle is used: <tableName>_<descriptiveFieldName>.

Posted: Fri Jan 19, 2007 7:06 pm
by PHPycho
I would appreciate your decision.....
is there anybody to share ideas, huh?

Posted: Fri Jan 19, 2007 7:51 pm
by Mohamed
feyd wrote:I typically use <applicationName>_<descriptiveTableName> for table names. "users" versus "user" doesn't really matter to me.

As for field identifiers, the same basic principle is used: <tableName>_<descriptiveFieldName>.
I am with feyd, I always use that conventions because you can easily query database without viewing it.