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

Home -> Community -> Usenet -> c.d.o.server -> Re: views: good, bad, mixed?

Re: views: good, bad, mixed?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 29 Nov 2000 07:49:07 +0100
Message-ID: <902brf$5ths1$2@ID-62141.news.dfncis.de>

Answers embedded

Hth,

Sybrand Bakker, Oracle DBA

"justanotherposter" <ltohill_at_twcny.rr.com> wrote in message news:901t48$l8$1_at_nnrp1.deja.com...
> I'm looking for opinions regarding the use of database views.
>
> What are the advantages of views?

Simplyfing selects, creating 'subsets' of data. Ie in my case I have a table from which I always have to select the records with status 'white'. You would better hide 'where status=1 /* the code for white */ ' in a view.

>
> What are disadvantages?

They are compiled. Also you can't use * as the * is resolved at compile time. If you change your underlying table, you will be forced to recreate the view.
Also the optimizer usually considers them as an independent unit, so it doesn't 'merge' the view with the rest of your statement.

>
> Would you recommend that developers use views for all database
> retrievals?

That would be an extreemly bad move!
> Why or why not?

See above.
>
> What about views that use views?
>

Bad idea. The chance the optimizer will choose inefficient access paths will increase using views on views.

> WHere/when do you use a view?
>
> How does a goal of DBMS portability affect your opinion, especially
> with respect to using views in
> development?
>
>
> TIA
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Nov 29 2000 - 00:49:07 CST

Original text of this message

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