Re: Is multi-type data in one field normal?

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Fri, 11 Apr 2003 14:06:51 -0700
Message-ID: <KdGla.19$037.259_at_news.oracle.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:r%Fla.338$zK7.33448137_at_mantis.golden.net...
> Having the application create new tables at the user's request means that
> the application must have access to a user id with resource privileges.
> Either the business must grant these privileges to all of the users of the
> application, or the application must hard-code or store a
user-id/password.
> Any of these options could present security issues.

I don't see any problem here. A user has privilege to create a table, what is big deal about it?

> Not only must a new table be created when the user invents a new
statistic,
> but the view that combines all of the tables must be replaced and the
> constraints re-declared.

Yes, the view must be redeclared, I see no way around this issue for now. Actually, a new syntax like this

replace view V as

   select id from newTable
   union
   select id from V

might be handy.

> All of the unecessary DDL will prevent static compilation (if this is
> necessary or desired) and will force the application to use dynamic SQL or
> some other form of code generation to deal with the multitude of table
names
> for similar queries.

Do you expect static compilation working with new types declared on the fly? I don't see any difference.

> The application that allows users to create new statistics must either
force
> end-users to invent unique legal names for each of the tables, or the
> application must generate a unique legal name that may lack meaning to
> users.

Same for new types. The application that allows users to create new types must either force end-users to invent unique legal names for each of the typess, or the application must generate a unique legal name that may lack meaning to users.

> The principle of orthogonal design requires that each of these statistics
> tables have a unique predicate, and I am unsure what predicate you might
> suggest. It is not entirely clear to me that every different statistic
type
> will have a unique domain.

Once again, how does the design with user-defined types solves this problem? Given 2 records with the same type, what predicate would you choose to distinguish them? Received on Fri Apr 11 2003 - 23:06:51 CEST

Original text of this message