January 2012
Intermediate to advanced
542 pages
11h 28m
English
In this recipe, we will see how to use virtual columns, a new feature in Oracle Database 11g, to avoid the use of DML triggers, resulting in a performance gain in our applications.
Virtual columns can also be used in referential integrity, tables can be partitioned by them, and statistics can be gathered on them.
The following steps will demonstrate the use of virtual columns:
SH schema:
CONNECT sh@TESTDB/sh
LOANS:CREATE TABLE sh.LOANS ( LOAN_ID INT NOT NULL, PAYMENT NUMBER, NUMBER_PAYMENTS NUMBER, GROSS_CAPITAL NUMBER);
LOANS table to calculate the GROSS_CAPITAL field, giving the number of payments and the amount of every ...