Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Table Design for 2 similar table
Yes, you understand my problem 100%.
If I combine them into 1 table, it will be easier to be extracted.
Otherwise, I have to union the 2 tables in order to get the result order by
datetime. however, as the 2 table have diff. attributes, I am not sure if
there are any simple way to make them union together.
"Brian E Dick" <bdick_at_cox.net> wrote in message
news:p1GL9.2513$pe.145800_at_news2.east.cox.net...
> The Ben Franklin rule of data modeling: A table for every thing and a
every
> thing in its table.
>
> From your brief description it sounds like the start and stop events are
> different things. If so, they belong in different tables. The fact that
they
> have the a couple of common attributes (PK?) and that you want to union
> their rows, alludes to a possible "type of" relationship.
>
> "Ginger Mall" <bocgco_at_hongkong.com> wrote in message
> news:3dfeb2c9_at_shknews01...
> > I am facing a question on schema design.
> >
> > There is 2 types of records. The 1st is start record of some activities
> > while the other is the stop record.
> > They contains actually different attributes except "UserID" and
> "DateTime".
> > The query will only extract the result by UserID and sort by DateTime.
> >
> > e.g.
> > .. User111 Start .......
> > .. User111 Stop .......
> > .. User111 Start .......
> > .. User111 Stop.......
> > .. User111 Start .......
> > .. User111 Start .......
> > .. User111 Start .......
> > .. User111 Stop .......
> > .. User111 Start .......
> >
> >
> > My problem is should I split these records into 2 diff. table ?
> >
> >
>
>
Received on Wed Dec 18 2002 - 01:48:39 CST