Re: Views for denomalizing
Date: 2 Feb 2005 22:34:47 -0800
Message-ID: <1107412487.933609.147500_at_c13g2000cwb.googlegroups.com>
>
> 4) The only normal form that cannot be breached when creating SQL92
views is
> the same one required for base tables -- 1NF. Even though the
purpose of a
> View is to provide the user a "view" of their data, if the user would
like
> to see lists as attributes (e.g. a list of e-mail addresses as an
attribute
> for a person), there is no provision for this in a SQL92 View.
>
Actually, SQL92 does NOT impose 1NF on us, because it does not force you to have a key on your table (in SQL-speak, that would be a primary key or unique constraint, usually enforced by unique indexes).
1NF is just another way to say that all data must be perceived as
relations,
and relations, by definition do NOT have duplicate tuples (or rows, in
SQL-speak).
1NF is easy to enforce with keys. On the otherhand it would be
very hard for the DB to enforce the other normal forms, if not
impossible,
without knowledge of the functional dependencies.
>
> Question: I recall that SQL Server UDF's permit lists to be returned,
while
> the last time I asked, Oracle did not. Do SQL Server customers
create views
> that include these user defined functions (returning derived data
values)
> with lists of values? If so, how does SQL handle queries against
such
> views? If not, what prohibits this?
What do you mean by "how does SQL handle queries against such views"?
What would you want it to do? Could you give an example?
regards,
Lauri Pietarinen
Received on Thu Feb 03 2005 - 07:34:47 CET