Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Side effect of replacing a table with a view

Side effect of replacing a table with a view

From: Vlado Barun <vlado_at_cadre5.com>
Date: Fri, 22 Apr 2005 12:28:59 -0400
Message-Id: <200504221629.j3MGT5g69323@cadre5.com>


I'm looking for input on what possible negative side effects I could encounter, if I replace a table with a view.  

Situation:

I need to add a few columns to an existing, non-partitioned, heap table
(let's call it "a"). However, I have identified a large number of "select *
" queries against this table. Finding where these queries are coming from and changing them is not feasible within the current environment.

So, I'm basically looking at two alternatives:  

  1. rename the existing table to "b", add the new columns to it and create a view named "a". The view will not expose any of the new columns
  2. create another table "a_ext", with the same PK as "a", enforce RI
    (cascade delete), add the new columns to it. Also add an update trigger on
    "a", in case the PK in "a" gets updated, so that the PK in "a_ext" gets updated too.

I prefer #1, but I'm concerned about possible negative side effect of renaming the table. Let's not worry about downtime, since it's not an issue in this environment. However, since table "a" is a very critical table, we need to make sure we do not break any existing code.  

We use Oracle 8.1.7.0, and yes it is .0, not .4  

Question:

Are there any operations that could fail as the result of replacing the table with a view?    

Vlado Barun, M.Sc.

Senior Data Architect, Cadre5

www.cadre5.com <http://www.cadre5.com/>  

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 22 2005 - 12:36:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US