Sorting and summing record data including generated sum...

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000

Reexamination Certificate

active

06182071

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a database processing and a data processing performed in a computer system such as reordering and sorting a large quantity of data.
2. Description of the Related Art
In general, sorting is rarely processed on its own. The sorting is commonly used in combination with summing. An importance of combining the sorting and the summing in a data processing is described herewith. This will be described using an example. The example in Table 1 shows data of sales in a company.
TABLE 1
PRODUCT
BRANCH
QUANTITY
SALES AMOUNT
DATE
TV
TOKYO
2
200
3/15
TV
OSAKA
1
100
4/21
RADIO
OSAKA
4
100
4/21
TV
OSAKA
1
100
4/28
RADIO
TOKYO
1
25
5/10
RADIO
TOKYO
3
75
5/15
In this example, the data are being used for such summing as product quantity, sales amount per branch, and monthly total sales amount. Results of these summing are used to analyze the company's activities, markets, inventory controls and preparation for stocks. In Table 1, the data are being entered in an order of occurrence, or in other words, in a date order. Since the data are in the date order, upon summing of these data, sorting will be required for each of them, before summing the data. Results of the sorting are used to obtain the results of the summing.
For instance, when summing for sales amount per branch, a sorting is performed using a branch field. In the present specification, such field being used for sorting is called a “sort key”. A result of the sorting using the branch field is shown in Table 2.
TABLE 2
To the resulting data of Table 2, under the same branch field, values are summed together. To sum for the sales amount, the resulting data of Table 2 are searched from top to bottom, and by doing so the sales amount fields keeps on adding until a different branch field value, or in other words, a different sort key value is detected. The result obtained from this summing is shown in Table 3.
TABLE 3
BRANCH
PRICE
TOKYO
300
OSAKA
300
Further, certain cases of summing may involve a plurality of sort keys, for instance, a case such as summing for sales amount of products per every branch is one example. In such cases, a branch key is used as a first sort key and a product key is used as a next sort key when sorting the data. The result of sorting an original data of Table 1 using two sort keys is shown in Table 4.
TABLE 4
Using the sorted result of Table 4, subtotals of each product for each branch and a total value of all the products in each branch are calculated. In this example, following branch and product combinations are obtained: Tokyo & Radio; Tokyo & TV; Osaka & Radio; and Osaka & TV. In addition to the four combinations, two subtotal sale values in Tokyo and Osaka and the total of the two subtotals are calculated. In this example, the sorted data are searched from the top to the bottom to search for the branch field and the product field combinations in order, and accompanying price field for each combination is added until a different combination is detected. Further, for the two different branch fields, the process outputs the subtotal per branch. The result is shown in Table 5.
TABLE 5
BRANCH
PRODUCT
SALES AMOUNT
TOKYO
RADIO
100
TOKYO
TV
200
TOKYO
SUBTOTAL
300
OSAKA
RADIO
100
OSAKA
TV
200
OSAKA
SUBTOTAL
300
TOTAL
600
Summing using a plurality of sort keys will be called “layered summing” from hereinafter. As mentioned previously, in a data processing, it is indispensable to combine sorting in each field and summing, especially when dealing with a large quantity of accumulated data.
FIG. 13
illustrates a conventional data processing apparatus described in “Information Processing” Vol.33, No.12, p1416~1423. A description of the numbered components indicated in
FIG. 13
are: a data processing apparatus
1
; a sort processing unit
2
; a sum processing unit
3
; a control unit
6
; a merge processing unit
7
; and a host computer
8
.
An operation of the conventional data processing apparatus is described next using FIG.
13
. When a request for the data processing occur at the host computer
8
, the host computer
8
sequentially sends data for processing to the data processing apparatus
1
.
An amount of the data possible for sorting by the sort processing unit
2
depends on a memory capacity inside the sort processing unit
2
. There are two cases of possible processing, depending on the amount of data sent from the host computer
8
, that is, whether the data is over or under the sorting capacity.
(Case 1) A case when the data sent from the host computer is under the sorting capacity of the sort processing unit
2
.
The case 1 is illustrated in (a) of FIG.
14
. When the data is inputted to the data processing apparatus
1
, a sorting is performed in the sort processing unit
2
, then a summing is performed in the sum processing unit
3
using a result of the sort processing unit
2
, and a result from the sum processing unit
3
is sent back to the host computer
8
.
(Case 2) A case when the data sent from the host computer is over the sorting capacity of the sort processing unit
2
. The data are processed using the following two phases.
(Phase 1)
The phase 1 of case 2 is illustrated in (b) of FIG.
14
. The sort processing unit
2
creates a data sorted within the sorting capacity of the sort processing unit
2
, and the data processing apparatus
1
returns a result of the sorting from the sort processing unit
2
to the host computer
8
. In the phase 1, the sum processing unit
3
is not yet operating.
(Phase 2)
The phase 2 of the case 2 is illustrated in (c) of FIG.
14
. The data sorted in part according to phase 1 is resent from the host computer
8
to the data processing apparatus
1
. The sorted data is sent to the merge processing unit
7
for merging the sorted data, and the a resulting data from the merging is sent to the sum processing unit
3
for summing, and a result of the summing is returned to the host computer
8
.
For both cases 1 and 2, series of controls are performed by the control unit
6
. In the sort processing unit
2
comprising a plurality of sort processors P
1
, P
2
, P
3
and P
4
as shown in
FIG. 15. A
sort processor P
1
takes two input data at a time and the two input data are reordered (sorted) and sent to the next step, as shown in FIG.
15
. In the next step, a sort processor P
2
takes two sorted input data that are two apiece and the sort processor P
2
merges the two together to make a sorted four apiece data, and the four apiece data is sent to the next step, a sort processor P
3
. The operation similar is repeated onwards.
Using a plurality of sort processors, it is possible to start a processing before even completing the processing in a previous sort processor. In this way, by inputting data sequentially, though with some delay, a sorted result is outputted in parallel with the data input.
The merge processing unit
7
is described next. In general, merge processing unit is configured from a general-purpose processing unit such as microprocessor and controlled by its program. A flow of the process in the merge processing unit
7
is shown in FIG.
16
. The flow presumes a descending sorting, and assumes for merging M sorted data sequences to one sorted data sequence.
In step S
101
of
FIG. 16
, a number M of sorted data sequences for merging is loaded to a variable m. In step S
102
, a top data in m sorted data sequences are read. Table 6 is an example when the data sequences are M=2.
TABLE 6
As the top data, 6 is read from the data sequence
1
, and 8 is read form the data sequence
2
.
Next, in step S
103
, a maximum value is searched for from data read at step S
102
. In this example, the maximum value is 8. In step S
104
, d is set to 8, and the data sequence which 8 belongs to is the data sequence
2
, so i is set to 2. Step S
105
, outputs the value of d. In step S
106
, a next data is read from the data sequence with loaded number i. In this example, i=2, and the next data in data sequence
2
is 7, therefore, data
7
is read. Such process conti

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Sorting and summing record data including generated sum... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Sorting and summing record data including generated sum..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Sorting and summing record data including generated sum... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2487249

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.