T
Tony Williams
I'm looking for help on database construction. We have a current database
that would appear to be not normalised so I am looking for help on the
correct structure. Here is our problem.
We have 40 companies that supply us year to date data on a quarterly basis.
The data covers different areas of business activity. There are 7 main
groups that I will call Types 1 to 7 and within that we get data on two
subcategories that I will refer to as Type1A and Type1B and so on within
those 7 groups. The sum of Type1A PLUS Type1B EQUALS the value of Type1 so
the data comes in like this:
Type1A + Type1B=Type1
Type2A + Type2B=Type2
Type3A + Type3B=Type3
Type4A + Type4B=Type4
Type5A + Type5B=Type5
Type6A + Type6B=Type6
Type7A + Type7B=Type7
These equations represent the format in which the numerical data is sent to
us. All the above are numbers with 3 decimal places.
Each company sends us a form with this data.
At the end of each quarter we need to produce a report that summarises the
40 companies' figures. The report for say December 2004 would look like this
Qtr ended
YTD
Dec 04 Dec03 Dec
04 Dec03
Total of Type 1 2222.222 1111.111 44444.444
55555.555
Total of Type 2 2222.222 1111.111 44444.444
55555.555
Total of Type 3 2222.222 1111.111 44444.444
55555.555
Total of Type 4 2222.222 1111.111 44444.444
55555.555
Total of Type 5 2222.222 1111.111 44444.444
55555.555
Total of Type 6 2222.222 1111.111 44444.444
55555.555
Total of Type 7 2222.222 1111.111 44444.444
55555.555
You will see that we need to calculate the "quarter" totals which is in the
above example the difference between the totals for December 04 and the
totals for September 04 and similarly for 03.
Is anyone able to point me in the right direction as to how we should
consider constructing the database given that we need to store the values
for each type and subtype, the company providing the data and the quarter
date to which the data applies.
Thank you
Tony
that would appear to be not normalised so I am looking for help on the
correct structure. Here is our problem.
We have 40 companies that supply us year to date data on a quarterly basis.
The data covers different areas of business activity. There are 7 main
groups that I will call Types 1 to 7 and within that we get data on two
subcategories that I will refer to as Type1A and Type1B and so on within
those 7 groups. The sum of Type1A PLUS Type1B EQUALS the value of Type1 so
the data comes in like this:
Type1A + Type1B=Type1
Type2A + Type2B=Type2
Type3A + Type3B=Type3
Type4A + Type4B=Type4
Type5A + Type5B=Type5
Type6A + Type6B=Type6
Type7A + Type7B=Type7
These equations represent the format in which the numerical data is sent to
us. All the above are numbers with 3 decimal places.
Each company sends us a form with this data.
At the end of each quarter we need to produce a report that summarises the
40 companies' figures. The report for say December 2004 would look like this
Qtr ended
YTD
Dec 04 Dec03 Dec
04 Dec03
Total of Type 1 2222.222 1111.111 44444.444
55555.555
Total of Type 2 2222.222 1111.111 44444.444
55555.555
Total of Type 3 2222.222 1111.111 44444.444
55555.555
Total of Type 4 2222.222 1111.111 44444.444
55555.555
Total of Type 5 2222.222 1111.111 44444.444
55555.555
Total of Type 6 2222.222 1111.111 44444.444
55555.555
Total of Type 7 2222.222 1111.111 44444.444
55555.555
You will see that we need to calculate the "quarter" totals which is in the
above example the difference between the totals for December 04 and the
totals for September 04 and similarly for 03.
Is anyone able to point me in the right direction as to how we should
consider constructing the database given that we need to store the values
for each type and subtype, the company providing the data and the quarter
date to which the data applies.
Thank you
Tony