Pl sql code review, PL-SQL Programming

Assignment Help:

PL SQL Code Review

HEADER ELEMENTS

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.

Purpose

Brief description of the functionality of the Code.

Usage

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

Date

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.


Related Discussions:- Pl sql code review

Updating objects in pl sql, Updating Objects: To change the attributes...

Updating Objects: To change the attributes of objects in an object table, you can use the UPDATE statement, as the illustration below shows: BEGIN UPDATE persons p SET p

Dynamic sql - pl sql, Dynamic SQL: The Most PL/SQL programs do a predi...

Dynamic SQL: The Most PL/SQL programs do a predictable, specific job. For illustration, a stored procedure may accept an employee number and salary increase, and then update t

Testing triggers, Demonstrate your knowledge of PL/SQL programming by writi...

Demonstrate your knowledge of PL/SQL programming by writing and thoroughly testing triggers and stored procedures associated with an e-commerce application that provides security l

Literals in pl/sql, Literals A literal is an explicit numeric, string...

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

Semidifference via except and join - sql, Semidifference via EXCEPT and JOI...

Semidifference via EXCEPT and JOIN - SQL SELECT * FROM (SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' EXCEPT DISTINCT CORRESPONDING SELECT StudentId

Semidifference and not - sql, Semidifference and NOT - SQL In this sec...

Semidifference and NOT - SQL In this section first describe the relational difference operator, named MINUS. Example here shows SQL's closest counterpart of that operator.

Long and long raw in pl/sql, LONG and LONG RAW You use the LONG datatyp...

LONG and LONG RAW You use the LONG datatype to store the variable-length character strings. The LONG datatype is such as the VARCHAR2 datatype, except that the maximum length o

Data types, Datatypes Every constant and variable has a datatype that s...

Datatypes Every constant and variable has a datatype that specifies the storage format, constraints, and the valid range of values. The PL/SQL gives a variety of predefined dat

Overloading, Overloading The PL/SQL overloads the subprogram names. T...

Overloading The PL/SQL overloads the subprogram names. That is, you can use similar name for few different subprograms as long as their formal parameters differ in the number

Theory of special creation - origin of life, THEO R Y OF SPECIAL CREATION...

THEO R Y OF SPECIAL CREATION - Life originated on the earth due to natural events by the super natural power. The biblical story of creation of world within six days was p

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd