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

Fetching with a cursor, Fetching with a Cursor The FETCH statements re...

Fetching with a Cursor The FETCH statements retrieve the rows in the result set one at a time. After each and every fetch, the cursor advance to the next row in the result set

Second step at defining type sid in sql, Second Step at defining type SID i...

Second Step at defining type SID in SQL CREATE TYPE SID AS VARCHAR(5) ; Explanation: TYPE SID announces that a type named SID is being defined to the system.

Calculate the number of tuples, Question: (a) The objective of query opti...

Question: (a) The objective of query optimization is to choose the most efficient strategy for implementing a given relational query, thereby improving the system performance. On

"not enforced" table constraints - sql, "Not Enforced" Table Constraints ...

"Not Enforced" Table Constraints A constraint that is not enforced is not really a constraint within the meaning of the act, but SQL does have such a concept and it needs to b

Procedures - syntax, Procedures The procedure is a subprogram which can...

Procedures The procedure is a subprogram which can take parameters and be invoked. Normally, you can use a procedure to perform an action. The procedure has 2 sections: the spe

Forall statement - syntax, FORALL Statement The FORALL statements instr...

FORALL Statement The FORALL statements instruct the PL/SQL engine to bulk-bind the input collections before sending them to the SQL engine. Though the FORALL statement consists

Logical operators-pl/sql expressions , Logical Operators The logical op...

Logical Operators The logical operators AND, NOT, and OR follow the tri-state logic shown in table below. The AND and OR are binary operators; NOT is a unary operator.

Triggers, At times, customers make mistakes in submitting their orders and ...

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a trigger that automatically updates the stock level of all pr

Unnest operator in sql, UNNEST operator in SQL The inverse operator of...

UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p

Creating a table, Creating a Table Syantax: CREATE TABLE ENROL...

Creating a Table Syantax: CREATE TABLE ENROLMENT (StudentId SID, Name   VARCHAR (30) NOT NULL, CourseId CID, PRIMARY KEY (StudentId, CourseId)) ; Explan

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