Re: Oracle 11g Virtual Columns?

From: joel garry <joel-garry_at_home.com>
Date: Mon, 19 Jan 2009 13:17:28 -0800 (PST)
Message-ID: <09135fe3-a811-4191-a4a4-6cf5bd9437f4_at_k1g2000prb.googlegroups.com>



On Jan 19, 11:56 am, Serge Rielau <srie..._at_ca.ibm.com> wrote:
> zigzag..._at_yahoo.com wrote:
> > I have read various articles on virtual columns? I still do not
> > understand their advantages other than they save some disk space, One
> > can put logic of virtual columns in a trigger which will save
> > information in a real column. Real column will need some additional
> > disk space, but it will save some cpu time when one is doing slelects
> > on “virtual” columns.
>
> Sometimes the path how these features get born can be quite odd.
> The first to add virtual columns was SQL Server 2000. At the time when
> we did generated columns I puzzled a lot on what MS motivation might
> have been for virtual columns. Here are some thoughts I had:

The db-independent app software I work on has had this as an added on feature for many years. In some ways it can be very confusing, as it is often displayed the same as a real column, then you go to update it and it won't let you. Conversely, they show up as regular varchar2 columns in (oracle) SQL so you can really shoot yourself in the foot if you don't go through the app. I'm assuming they will eventually coordinate internally with the Oracle and SS thingies, but I may be an optimist.

From a functionality standpoint, they are extremely useful for coding business logic into the data. For example, if you have attributes for different accounting things like overhead and labor etc., in a costs table, you might want a column that adds them up properly, rather than relying on stored procedures or heaven forbid, application programmers. Inventory type things like "quantity outstanding" can get somewhat complex.

jg

--
_at_home.com is bogus.
http://www3.signonsandiego.com/stories/2009/jan/19/1m19video223959-they-came-brawl-rock-out-and-play/?uniontrib
Received on Mon Jan 19 2009 - 15:17:28 CST

Original text of this message