| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: views of binary operations
David Cressey wrote:
>
> Consider the following:
>
> CREATE VIEW US_ADDRESSES AS SELECT * FROM ADDRESSES WHERE COUNTRY_CODE =
> 'US';
>
> ALTER TABLE ADDRESSES ADD COLUMN EMAIL_ADDRESS CHAR(25);
>
> Now, the next reference to US_ADDRESSES is going to deliver the new column,
> if the expansion of the wildcard is deferred. If, however, the expansion of
> the wildcard is carried out at definition time, the addition of the new
> column won't be reflected in the view. Come to think of it, I forget which
> way Rdb worked in this regard.
Interesting!
Wildcard attribute specification is something of a problem for
modularity,
isn't it? If you fail to explicitly specify the attributes you want,
and another
attribute is added that otherwise would not affect your query, you
will suddenly be getting one more column than you expected, which
might break your code, even if you didn't need to care about the new
attribute otherwise.
I didn't say that very well, did I?
Marshall Received on Tue Jul 18 2006 - 00:06:52 CDT
![]() |
![]() |