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: a very simple Oracle question

Re: a very simple Oracle question

From: Steve Davis <spd_at_patrol.i-way.co.uk>
Date: Tue, 05 May 1998 21:44:44 GMT
Message-ID: <354e379d.0@news.i-way.co.uk>


Dee,
Add an ID column of type number(#) to your person table. Choose # to allow the maximum number of people you will EVER have in the system e.g. number(4) will allow up to 9999, number(5)- up to 99999 etc. Then, store the person_id in the timesheet table instead on the name.

Replace the project id column with a column of type number(#) [or add a column if the character ID has some meaning]. Again, choose # to allow the maximum number of projects you will ever have.

If subactivity and activity are dependant, it may be worth storing combinations, rather than both values.
i.e. if the possible combinations of activity/subactivity are XX PP
XX QQ
YY RR
YY SS
ZZ TT
create a table activity_combionations containing activity, subactivity, id:
XX PP 1
XX QQ 2
YY RR 3
YY SS 4
ZZ TT 5
Then store the ID in the timesheet table instead of activity and subactivity.

If the possible combinations are
XX PP
XX QQ
XX RR
XX SS
XX TT
YY PP
YY QQ
YY RR
YY SS
YY TT
ZZ PP
ZZ QQ
ZZ RR
ZZ SS
ZZ TT
Don't bother with the extra table - just treat activity and subactivity the same as project, and store a numeric ID instead of the character code.

HTH,
Steve

"Dee" <garg_at_iname.com> wrote:

<snip>
>Name Date Project Activity Subactivity hrs

>John 01/01/97 ABC AA AC 2
>John 01/01/97 ABC AA BC 1
>John 01/01/97 ABC AG AC 2
>John 01/01/97 DEF AA AC 2
>John 01/01/97 DEF AA AT 2
>John 01/02/97 ABC AA AC 2
>John 01/02/97 ABC AA AC 2
>John 01/02/97 GHI AN TT 2
>John 01/02/97 ABC AL AC 2
>Tom 01/01/97 ABC AA AI 2
>Tom 01/01/97 ABC AS AC 2
>Tom 01/01/97 JJJ AA AC 2
>Tom 01/01/97 JJJ AT AC 2
>Tom 01/01/97 LLL AA AC 2
>Tom 01/01/97 LLL AK AC 2

> I see that 2 employees will enter almost 20 records for just 1-2 days time
>sheet with lot of data which is same in every record. What is the efficient
>way of doing this.
>Any help will be apperitiated.

>DEE
Received on Tue May 05 1998 - 16:44:44 CDT

Original text of this message

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