Pl sql code review, PL-SQL Programming

PL SQL Code Review


File Name

Clear, meaningful and descriptive about main objective of the file. Multiple words are joined using underscores which adheres to the file naming standards.


Brief description of the functionality of the Code.


Method of calling the SQL in the prompt to the test the Code.


when the development of the Code was started.

Edit History

History of changes made to the Code. Update Edit History in case of Change Request to reflect the changes made in the code.

Author (Company Name)

Use standard Boiler Plate given by the client.

Coding Conventions Systematize and Automate

Use code templates to design and make available headers and structures. Build your checklists into these templates!

Use automated formatters at both the individual and team levels. Do not manually format your code. Big waste of time.

General Guidelines while Coding

(i) Standard (space-based) block nesting indentations should be two spaces

(ii) Avoid Using TABS for indendation, use spaces instead

(iii) All the Keywords of SQL should be in CAPS

(iv) The functional overview comment of a routine should be indented two spaces. The highest-level statements that follow the overview comment should be in the same column

As comment, with each nested block indented by two spaces

(v) Adequate blank lines should be left to aid readability of source code

(vi) Proper Indentations should be used when writing PL/SQL code, like IF and ENDIF, LOOP and END LOOP should line up correctly.

(vii) Use SQL%ROWCOUNT to increment counters after Insert/Update/Delete statements.

(viii) There should not be more than one expression per line

(ix) A blank line should separate the code and DECLARE/ BEGIN/EXCEPTION/ END.

(x) The beginning of stored procedure should start with ‘BEGIN’ in uppercase and end with ‘END’ in uppercase.

(xi) Write consistent Log messages using DBMS_OUTPUT package detailing the no of rows updated/inserted/deleted in the tables.

(xii) Give inline comments wherever code is changed in case of CR’s(Client Requests).

(xiii) Application code must raise, handle, log and communicate errors in a consistent, robust manner.

(xiv) Use proper indexes

(xv) Maximise SQL and minimise PL/SQL

(xvi) Instrument your code for debugging - Choose your favourite method: debug statements judiciously places throughout your code, or perhaps using DBMS_PROFILE (that is definitely a topic I'll do soon), or something else entirely. As long as you have a way to troubleshoot bugs and performance issues later on.

Posted Date: 9/21/2012 3:43:48 AM | Location : United States

Related Discussions:- Pl sql code review, Assignment Help, Ask Question on Pl sql code review, Get Answer, Expert's Help, Pl sql code review Discussions

Write discussion on Pl sql code review
Your posts are moderated
Related Questions
Literals A literal is an explicit numeric, string, character, or Boolean value not represented by an identifier. Numeric literal 147 and the Boolean literal FALSE are some of

Scoping Within the similar scope, all the declared identifiers should be unique. So, even if their datatypes differ, the variables and parameters cannot share the similar name.

MAX and MIN operator in SQL Example: (SELECT MAX (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') (SELECT MIN (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') Example


Updating Tables in SQL The topic of updating by describing the assignment operator, ":=" in Tutorial D. SQL uses a different syntax for assignment, using the key word SET and

Updating by replacement Syntax: UPDATE ENROLMENT SET Name = 'Ann' WHERE StudentId = SID ('S1'); Note the use of SET, as already noted in connection with direct a

Using the student and faculty tables create a select query that outputs all students for a specific advisor. Generate the execution plan, select out the explain plan . Create an

BETWEEN and NOT BETWEEN Operator in SQL Example: Restricting exam marks to between 0 and 100 CREATE ASSERTION Marks_between_0_and_100 CHECK (NOT EXISTS (SELECT * FROM

DBMS_PIPE: The Package DBMS_PIPE allows various sessions to communicate over the named pipes. (A pipe is a region of memory used by one of the process to pass information to

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. T