Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Table Design for 2 similar table
"Ginger Mall" <bocgco_at_hongkong.com> wrote in message news:<3e02a536$1_at_shknews01>...
> thanks all of your input, very precious !!
> I would prefer to have 1 table as it makes the design and application coding
> simplar.
>
> Thanks
>
> "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 ?
> >
It looks like you got your answer. I would hazard that one table is the best design. Remember if necessary you can join a table to itself and potentially link the records using "connect by".
The real key to performance will be how many rows you need to retrieve in a query and what you know in the where clause.
IMHO -- Mark D Powell -- Received on Fri Dec 20 2002 - 12:27:33 CST