all groups > sql server programming > may 2007 >
You're in the

sql server programming

group:

User table naming woes - your thougts?


Re: User table naming woes - your thougts? David Portas
5/2/2007 10:47:32 PM
sql server programming:
[quoted text, click to view]

I prefer to use plurals or collective nouns for tables. A useful
observation made some time ago by Hugo Kornelis is that almost none of
the SQL reserved words are plurals, so you'll get fewer clashes that
way.

Avoid Hungarian notation. It wastes space and harms readability. Also
it runs the risk that people might mistake you for an Access
developer. No-one wants that do they? :)

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
User table naming woes - your thougts? Ronald S. Cook
5/2/2007 11:12:31 PM
If I don't want to put brackets around my table names (that are reserved
keywords) every single time I need to reference them in SQL, what are my
alternatives? Case in point, a table we wish to name "User":

1) Deal with the brackets and go with [User] -- this would kill me
2) Instead of [User], go with SystemUser or something else -- this would
kill me more
3) Go with Hungarian notation and name it tblUser -- I used to do this but
Hungarian is "so 1980s" now (I'm being told by Microsoft anyway).
4) Other thought?

Thanks,
Ron



Re: User table naming woes - your thougts? Uri Dimant
5/3/2007 12:00:00 AM
Users?
http://vyaskn.tripod.com/object_naming.htm







[quoted text, click to view]

Re: User table naming woes - your thougts? Tom Cooper
5/3/2007 1:53:43 AM
IMHO, don't use reserved words as identifiers (not any name on the SQL
Server reserved keywords or the ODBC/SQL-92 reserved keywords or the future
keywords list) . But many people would normally name tables with plural
names, since tables typically contain more than one row. So don't name your
table User, name it Users, which is not a reserved word.

Tom

[quoted text, click to view]

AddThis Social Bookmark Button