Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Table Design for 2 similar table

Re: Table Design for 2 similar table

From: Tim X <timx_at_spamto.devnul.com>
Date: 18 Dec 2002 09:55:44 +1100
Message-ID: <874r9cw8zz.fsf@blind-bat.une.edu.au>


"Ginger Mall" <bocgco_at_hongkong.com> writes:

> 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.
>
> My problem is should I split these records into 2 diff. table ?

I think it depends on what it is your trying to model and what the data will be used for.

For example, if the start records and stop records are two components of some sort of transaction and you will be mainly interested in the data at that transaction level, I would be inclined to consider the transaction the entity and use just one table. However, if your primary interest is the stop and/or start records themselves, then I would consider them each to be their own entities and put them in their own tables.

This is a bit simplistic, as other issues also need to be considered -

Do the start/stop records have a 1-to-1 relationship? Will there be many start records without stop records and vice-versa? Do the records have any common but conflicting attributes? etc

-- 
Tim X.
tcross (at) northnet com au
Received on Tue Dec 17 2002 - 16:55:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US