Re: Sanity check re. layering of views

  • From: david wendelken <davewendelken@xxxxxxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 16 Mar 2005 06:38:37 -0800 (PST)

I've done things like that when the columns were so poorly named that the 
developers got the columns confused with one another all the time, and I wasn't 
allowed to fix the names in the table.    A classic case is a cross-reference 
table for a many-to-many relationship from one table to itself.  If the two id 
columns are named poorly, the programmers will frequently use the wrong one all 
the time.

It can be cheaper to write the view and therefore have the programmers use the 
right column in the right place than it was test for and clean up the mistakes 
they were making and would have continued to make!

Of course, fixing the original table would have been better, but that too is a 
battle I've occasionally chosen not to take up because I would lose it and then 
be forbidden from using the view out of spite.

>I have seen it ... but I have also seen something like this ...

>create table foo (col1 number, col2 number)
>/

>create view v_foo as 
>select col1 column_1, col2 column2
>   from foo
>/

>Simply because they didn't like the column names on the table, a view
>is created.


--
//www.freelists.org/webpage/oracle-l

Other related posts: