Categoria: PL/SQL Oracle

Binary Search

One of the most interesting algorithms of research is binary search algorithm. This is the fastest algorithm (algorithm of binary trees apart) to search a data inside a group of elements. In fact it runs in a worst log2(x) comparisions before to find (or not) the data. The only prerequisite is : the set of…
Leggi tutto


23 Marzo 2017 0

Record data type

In Pl Sql exists a lot of data types : varchar2, number, float, double, boolean, etc, but it may happen that you want to use a structure that contains several types of data, we call it Record type. It’s a simply a new data type. Record type is formed by a group of one or…
Leggi tutto


13 Marzo 2017 0

Nested table

In PL SQL exists an efficient and adaptable collection of data: Nested table. Nested table is similar to one dimensional array but with some differences : An array has declare number of element – Nested table not. The size of nested table can increase using extend method. An array has always consecutive elements – Nested…
Leggi tutto


2 Marzo 2017 0

Goal Search Algorithm

Description: Goal search algorithm or search algorithm of the limit of a monotonically increasing sequence bounded above. 1) Purpose: Research of limit of a monotonically increasing sequence bounded above. 2) Example: Suppose to want to create a 10 meters high tower with a tolerance of 10 millimeters, having a given number of bricks, each of…
Leggi tutto


28 Agosto 2014 0

Hide Pl/Sql source code

To hide PlSql source code you can use both: dynamic obfuscation the wrap utility You might have to wrap some of yours PlSql objects just to provide the security of your code. Once wrapped, your code can’t be displayed from the static data dictionary views [ *_SOURCE ]. You can wrap the following types of…
Leggi tutto


26 Maggio 2014 0

Execution flow of an sql statements

  The execution flow can be divided into four stage. Not all Sql Statements will use all the stages: Parse:  at the beginning the statement must be parsed, this mean check the syntax and associate it with the cursor. It also verifies if the privilege are correct and if the objects referenced really exists Bind:…
Leggi tutto


20 Maggio 2014 0

Create triggers on system events

System events are particular database states that can be used to fire a system trigger. Is possibile to create triggers for these events at DATABASE or SCHEMA level. When a triggering event occurs, the database will open an autonomous transaction scope, fire the trigger and commit any transaction imbedded in the trigger. The available system…
Leggi tutto


26 Febbraio 2014 0

A simple procedure for create a flat csv file from table

Sometimes can be useful to produce a CSV file semicolon separated from a table. Here a simple dynamic procedure that works without write sql scripts pl sql code. Just put in some parameters and execute it from everywhere. With little customizations you can add a parameter for separator, add “” for strings, columns to avoid…
Leggi tutto


20 Gennaio 2014 0

AUTHID property

The AUTHID property of a stored PLSQL unit, determines the authorization under which a PLSQL subprogram operates at run-time. You can use two clause:  . CURRENT_USER : when the subprogram is executed , it will run using the rights of the person that invoked the code, not with the creator’s rights  . DEFINED : when…
Leggi tutto


3 Gennaio 2014 0

Create an Index By Table of Record

An index by table is an associative array. An associative array never has more than two columns: the variable being indexes and the index value. However you can combine a record with an associative array to tie multiple values to the same index.   In this case the array still has a variable and an…
Leggi tutto


9 Dicembre 2013 0