Wednesday, July 18, 2007

Blasted bots and more 11g

So, I start my blog up again and what happens? Some stupid "bot" on Google determines somehow that this is a spam blog and locks it out. I had to go through a few minor hoops to get it up and running again, but it was still irritating.

Note: They had me back up and running after about 7 hours or so...

So, how about some 11g stuff. At the moment I just finished the section on virtual columns in Oracle Database 11g. Basicly a virtual column is a derived column. It derives it's value from other data stored in the table. Data in a virtual column is not stored in the database, so they consume no disk space. You can, within some restrictions, apply functions to the virtual columns, case statements and such things.

What is interesting about virtual columns is that you can use then as partition keys in partitioned tables. As Spock would say, most facinating! Here is a quick example of a table created using a virtual column:

create table emp (emp_id number, salary number, our_401k_addition as ( (salary/12)*.05) );
and the results:

SQL> insert into emp values (1,1000,default);
1 row created.

SQL> select * from emp;

---------- ---------- -----------------
1 1000 4.16666667

So, now we know our 401k 5% contribution!

Oracle Database 11g New Features provides even more in-depth coverage and examples!

More to come!!

No comments:

Subscribe in a reader