In regard to naming conventions for Stored Procs, we use two kinds of SPs that we call basic and custom. Every table has three basic SP's ... one for selecting, one for deleting and one for updating ... all by PK (the update one does either an update or an insert, depending on the PK passed to it). We name them like this:
bsp_MyTableGet
bsp_MyTableDelete
bsp_MyTablePut
(It may seem like a lot of work to have 3 SPs for every table, but they are all auto-generated with the click of a button with a VFP utility I wrote.)
All the custom SP names start like this:
csp_MyParentTable
... and then describing what it does ... for example csp_MyParentTableGetAddress
The reason for using the MyParentTable name is that so all the csp's will all be grouped together. For example, the personnel functionality involves a lot more tables than just the Personnel table, but all the csp names will start with csp_Personnel...
~~Bonnie
>>My conventions are:
>>
>>Fields:
>>No spaces on field names, EVER!
>>The PK of a table is always named ID (or the same for all tables), and when using it as a FK the convention is (tablename)ID (I write a lot of dynamic SQL and DMO, this makes things easier) - it also forces you to write readable SQL by using the (table).(field name) convention
>>
>>Tables:
>>Use the tbl Prefix (tblCustomers) - very optional
>>
>>
>>SP:
>>Never preffix with sp_ (forces an extra trip thru the Master DB before resolving in current DB)
>
>Now that's one for the standards book!