Re: Oracle Development - Best Practice

  • From: Peter.McLarty@xxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Mon, 9 Feb 2004 13:05:56 +1000

You might like to have  a look through the white papers on www.dulcian.com 
and ask this question on ODTUG-DEV2K-L@xxxxxxxxxxx you will have to sign 
up either ListGuru@xxxxxxxxxxx or the ODTUG website

Cheers

--
=================================================
Peter McLarty               E-mail: Peter.Mclarty@xxxxxxxxxx
Technical Consultant        WWW: http://www.mincom.com
APAC Technical Services     Phone: +61 (0)7 3303 3461
Brisbane,  Australia        Mobile: +61 (0)402 094 238
                            Facsimile: +61 (0)7 3303 3048
=================================================
"Whatever you can do or dream you can, begin it. 
Boldness has genius, power and magic in it, begin it now."
Goethe 1749 -1832 
=================================================
Mincom "The People, The Experience, The Vision"

=================================================

This transmission is for the intended addressee only and is confidential 
information. If you have received this transmission in error, please 
delete it and notify the sender. The contents of this e-mail are the 
opinion of the writer only and are not endorsed by the Mincom Group of 
companies unless expressly stated otherwise. 






jaysingh1@xxxxxxxxxxxxx
Sent by: oracle-l-bounce@xxxxxxxxxxxxx
08/02/2004 09:35 AM
Please respond to oracle-l

 
        To:     oracle-l@xxxxxxxxxxxxx
        cc: 
        Subject:        Oracle Development - Best Practice


Dear All,

We are starting a new oracle development project and my boss wants me to 
prepare "Oracle Development- Best practice" document/presentation kind of 
stuff.  Basically this is to avoid common mistakes during the development 
cycle.

I have few points..

For example,

1) While writing pl/sql, use the correct datatype so that implicit 
conversion will be avoided

2) Use bind variable to avoid unnecessary parsing

3) Use BULK COLLECT, % ATTRIBUTES wherever required

4) MODULARITY
Write the code that fit into your screen size.
Through successive refinement, you can reduce a complex problem to a
set of simple problems that have easy-to-implement solutions.

5) EXCEPTION WHEN OTHERS is almost always a BUG unless it is immediately 
followed by a 
RAISE.Use WHEN OTHERS exception as the last resort and handle exceptions. 
For Example,
EXCEPTION
  WHEN OTHERS THEN
      if (sqlcode=-54) then
            .... deal with it.
      else
            RAISE;
      end if;


6) Tom's Mantra
 
                 If (possible in SQL)
                                 do it;
                 else if(possible in PL/SQL)
                                 do it;
                 else if(possible in JAVA)
                                 do it;
                 else
                 ..
                 ..
                 end if;
 
7)% ATTRIBUTES

Use %TYPE and %ROWTYPE attributes. No code change is required when schema
structure changes.

8) BEFORE VS AFTER TRIGGER

NEVER USE BEFORE TRIGGER FOR VALIDATIONS. Use BEFORE triggers ONLY to
modify :NEW value.

AFTER row triggers are slightly more efficient than BEFORE
row triggers. With BEFORE row triggers, affected data blocks must
be read (logical read, not physical read) once for the trigger and
then again for the triggering statement.
Alternatively, with AFTER row triggers, the data blocks must be
read only once for both the triggering statement and the trigger.

These are only few points w.r.t oracle developers. I like to get more info 
from you.

Your help would be really appreciated.

Thanks
Jay

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------





-- 
This transmission is for the intended addressee only and is confidential 
information. If you have received this transmission in error, please notify the 
sender and delete the transmission. The contents of this e-mail are the opinion 
of the writer only and are not endorsed by the Mincom Group of companies unless 
expressly stated otherwise.

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: