Friday 12 July 2013

What is a purity level? How it is should be taken into consideration when you’re writing any database objects i.e., trigger, function, procedure etc.

Purity level defines what type of data structure function reads and modify.

There are 4 types of purity level
1) WNDS (Write No Database State)
2) RNDS (Read No Database State)
3) WNPS (Write No Package State)
4) RNPS (Read No Package State)

For package function, PRAGMA RESTRIC_REFRENCES is required.
i.e.    PRAGMA RESTRICT_REFRENCES(functionname,WNPS,RNPS)

No comments:

Post a Comment