Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: best way to to a "union" in a table?
Mark Harrison wrote:
> I have a data structure that I need to represent
> in a table.
>
> It is a changelist, and the contents of the changelist
> are either
>
> - an existing element in the system, in which case it
> already has a unique identifier, or a
>
> - new element to be added to the system, in which case
> it does not have an assigned unique identifier, but
> instead a string identifying a disk file path.
>
> What's the best way to represent this as an sql table?
> The obvious way is something like:
>
> changelist_number NUMBER
> entry_type -- either MODIFY or NEW
> identifier NUMBER -- if entry_type is MODIFY
> filepath VARCHAR -- if entry_type is ADD
>
> Am I going down the right path?
>
> Many TIA!
> Mark
Insufficient information to really know. One would have to know far more about the business rules to render a judgement one way or the other. This is really not something that is likely to be an answerable question in the context of a usenet group but others may be braver than I.
BTW: VARCHAR2 ... not VARCHAR.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Fri Nov 18 2005 - 12:59:26 CST