Unix Technical Forum

updtaing through a virtual column of a view

This is a discussion on updtaing through a virtual column of a view within the Oracle Database forums, part of the Database Server Software category; --> I had read several articles of internet that compression/decompression of blob can be implemented transparently (i.e., without modifying third ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-23-2008, 09:11 AM
Prem K Mehrotra
 
Posts: n/a
Default updtaing through a virtual column of a view

I had read several articles of internet that compression/decompression
of blob can be implemented transparently (i.e., without modifying
third party code)
using views and instead of triggers for insert/delete/update.

I have a table blobtble( in third party application) which I renamed
to
blobtable_orig:

create table blobtable_orig
(
body_txt blob
);

I want to compress blob when storing in database and uncompress it
when selecting it. My code comes from third party, so I cannot make
any changes except I can modify database schema such as create
triggers and views.
I had created a thread on this sometime ago but now I am starting
another thread to point the specific problem with update.

I defined a vlwe:

create of replace view blobtable as
select uncompress(body_txt) body_txt from blobtable_orig

I create instead of triggers for delete/insert/update, in these
trigggers
I do operations on original table (table_orig) where I can compress
the body_txt
column before making changes to database.

While insert worked just fine, update gives me error:
ORA-01733: virtual column not allowed here
ORA-06512: at line 13

I don't know why insert instead of trigger will not complain where as
update
will complain. Is there a way around since I cannot modify application
code?

Eralier I was thinging of not using views sintead use fine grained
auditing
which implements "select triggers".However, I didnot find any way in
FGA
to modify the value to ve returned to application (as is done in view
using
decompress(...)).


Prem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-23-2008, 09:11 AM
Prem K Mehrotra
 
Posts: n/a
Default Re: updtaing through a virtual column of a view

premmehrotra@hotmail.com (Prem K Mehrotra) wrote in message news:<43441e77.0405091409.73cd2504@posting.google. com>...
> I had read several articles of internet that compression/decompression
> of blob can be implemented transparently (i.e., without modifying
> third party code)
> using views and instead of triggers for insert/delete/update.
>
> I have a table blobtble( in third party application) which I renamed
> to
> blobtable_orig:
>
> create table blobtable_orig
> (
> body_txt blob
> );
>
> I want to compress blob when storing in database and uncompress it
> when selecting it. My code comes from third party, so I cannot make
> any changes except I can modify database schema such as create
> triggers and views.



Sorry, I made a mistake. Have been working too long today. When writing
instead of trigger for update, I changed logic for update, but I still had
insert in the definition of trigger,so there was no instead of trigger
on update. That'swhy insert was working fine and not update.


> I had created a thread on this sometime ago but now I am starting
> another thread to point the specific problem with update.
>
> I defined a vlwe:
>
> create of replace view blobtable as
> select uncompress(body_txt) body_txt from blobtable_orig
>
> I create instead of triggers for delete/insert/update, in these
> trigggers
> I do operations on original table (table_orig) where I can compress
> the body_txt
> column before making changes to database.
>
> While insert worked just fine, update gives me error:
> ORA-01733: virtual column not allowed here
> ORA-06512: at line 13
>
> I don't know why insert instead of trigger will not complain where as
> update
> will complain. Is there a way around since I cannot modify application
> code?
>
> Eralier I was thinging of not using views sintead use fine grained
> auditing
> which implements "select triggers".However, I didnot find any way in
> FGA
> to modify the value to ve returned to application (as is done in view
> using
> decompress(...)).
>
>
> Prem

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com