- Each database object must have a short description
- If needed, each object should have ‘Implementation Flow’ (bullet
point) which will describe the logic implemented within it. Comment should
point to proper bullet point
- Each logic should have proper comment and should refer to
appropriate ‘Implementation Flow’
point
- Each database object must have ‘Version History’. Every time the
object is modified an entry should be added. The format is as below-
- Format - [Serial #] - [Author] - [Date] - [Short Description]
- Example – 1 – Tom Brady – 03/20/2012 –
Created
- Example – 2 – Tom Brady – 03/21/2012 – Unit
tested
- Database object Naming Convention as follow -
- Stored Procedure – prefix SP
i.
Example - SPStoredProcedureName
- Function – prefix FN
i.
Example – FNFunctionName
- Trigger – prefix TR
i.
Example – TRTriggerName
- Variable – camel case (first letter of first
word in small case, first letter of subsequent words in upper case)
i.
Example - @firstVariableName
- Temp table – camel case
- NULL checks need to be added for each
mandatory input. If value is missing, error need to be raised
- Example -
-- NULL check for inputs
IF @inputOne IS NULL OR
@inputTwo IS NULL
BEGIN
RAISERROR('All inputs are required', 10, 1);
RETURN;
END;
|
- TRY
– CATCH block need to be
added
[Not complete]
No comments:
Post a Comment