May 27, 2004 at 6:05 pm
G'd evening!!!
Can some one tell me if there is a naming convention for the sql objects?. Actually i use prefixes as i see most of the people use... But i don't know why do i do it i would like to have a better reason insted of say: "Because every body do".
Any help will be apprecited.
Regards
Estuardo
Manifest plainness,Embrace simplicity,Reduce selfishness,Have few desires.
Lao-t'ze.
May 31, 2004 at 8:00 am
This was removed by the editor as SPAM
June 3, 2004 at 10:17 pm
Estuardo,
There is no standard naming convention for SQL objects, however most people tend to use very simalar prefixes, and some people prefer to use suffixes.
The reason people use prefixes and the like is so when you have 500 stored procedures you can organise them by sorting them alphbetically and having all spDelete...., spUpdate...... etc all grouped together instead of having to hunt through every object to work out what it is doing. Also, it makes a clear distinction between tables, views, triggers etc.
If you do a search on this site you will find a number of discussions about naming conventions.
Cheers,
Angela
June 4, 2004 at 10:14 pm
There's a free e-book available at this URL...
It discusses naming conventions and several other database architecture topics in the context of SQL Server.
Creator of SQLFacts, a free suite of tools for SQL Server database professionals.
June 5, 2004 at 9:26 am
G'd Afternoon!!!
Angela: Thank you very much for your reply. You're right. Some times could be better to group the objects by the task they perform to avoid long names and complicated sufixes and abreviations.
Wingeniuos: Deeply thank you. That's exactly what i was looking for. I know any one can go to the link you kindly supply, but i also want to let here some of the information about the naming convention i found in the book
Object Type Object Prefix
Table
tbl
Stored Procedure
usp
User-Defined Function
udf
Trigger
trg
View
qry
Index
idx
Key Constraint
key
Key Constraint
keyPK Primary Key
Key Constraint
keyFK Foreign Key
I must say that is the fist time i see the usp Prefix as well as qry (for views). Now i have a good starting point
Thank you very much to both.
Regards
Estuardo
Manifest plainness,Embrace simplicity,Reduce selfishness,Have few desires.
Lao-t'ze.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply