Stored Procedure Naming Convention Addendum
Total Page:16
File Type:pdf, Size:1020Kb
Stored Procedure Naming Convention Addendum
We are trialing a new stored procedure naming convention for stored procedures in the .Net environment. This convention will be the second sp naming convention for IPT. We will run both conventions side-by-side, and eventually all new stored procs will be written in the new convention.
This is purely a trial of the new naming convention, as discussed by the architects, however if anyone would like to input we can make changes, but there will only ever be 2 naming conventions. Stored procedures in draft 1 of this naming convention should be renamed for the final version.
These stored procs will be almost purely single statement (CRUD) or wrappers of single statement stored procs. Feel free to start using this convention for ASP3 apps, but run the stored procs by the architects first.
Naming convention sp
Eg. spUser_Select_ForAuthentication.PRC spUser_Process_AllRelated.PRC spUserInterestTopic_Insert.PRC
Prefixes could be used to group stored procs specifically for a system (eg. Reporting ‘spReport_User_Select_PartnerCounts’), but let’s try to work towards common CRUD procedures for all systems, with business logic in the .Net tiers.
Use a suffix (or prefix) ‘Test’ for test/spike stored procedures so these can be removed when not needed. You may also wish to add a further suffix to distinguish your test from others for the same stored procedure.
Further guidelines
Continue to use the current stored procedure template, including the grant permissions statement, and copy comments to CVS when checking in. Only comment your first change on a piece of work, not fixes (do change the version though). Remove comments older than say 6 months when you get say +20 comments (we can always look back at old ones in CVS.) Group scripts into subfolders in CVS (eg. Reporting, Admin, Archiving, Removed) Remove the ‘dbo.’ from filenames in CVS . New stored procedures can be stored in your .Net CVS module.
Stored procedures for the IPTCore (MyOffers) database will have a common CVS location (to be determined).