JPH09179882A - Data base access system by cpu - Google Patents

Data base access system by cpu

Info

Publication number
JPH09179882A
JPH09179882A JP7341568A JP34156895A JPH09179882A JP H09179882 A JPH09179882 A JP H09179882A JP 7341568 A JP7341568 A JP 7341568A JP 34156895 A JP34156895 A JP 34156895A JP H09179882 A JPH09179882 A JP H09179882A
Authority
JP
Japan
Prior art keywords
data
type data
cpu
information
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP7341568A
Other languages
Japanese (ja)
Inventor
Mitsuya Fukumoto
満也 福元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP7341568A priority Critical patent/JPH09179882A/en
Publication of JPH09179882A publication Critical patent/JPH09179882A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide the data base access system which enables the CPU to write and read a large amount of data in and out of a data base. SOLUTION: To access respective divisional data bases 1D-nD of matrix constitution of 1st-(n)th data in the format that time information is added to data by 1st-(m)th kinds, respective data storage destination definition tables 37, a table 44 wherein maximum data lengths of kind data are defined for the data numbers by the kinds of the respective data, a table 45 wherein column addresses are defined for the numbers are provided. Here, a 1st converting means 40 recognizes a received data storage destination from the respective data storage destination tables 37, a 3rd converting means 41 recognizes the (Tn)th row address corresponding to the difference time Tn between the head of recognition 1D-nD and reception time information, and a 2nd converting means 42 finds data correspondence numbers by reception kinds from the table 44, finds its number correspondence row address from the table 45, and stores received data in the storage address of the intersection of the column address and the recognition row address of the 3rd converting means 41.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明はCPUによるデータ
ベースアクセス方式に関する。このCPUによるデータ
ベースアクセス方式は、例えば複数の支局から送信され
てくる多量のデータを中央局で受信し、中央局のCPU
の制御によって縦横の表構成(行列構成)のデータベー
スに受信データを書き込んで格納すると共に、格納デー
タを読み出して所定の演算処理を行うものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database access system using a CPU. In this database access method using a CPU, for example, a large amount of data transmitted from a plurality of branch offices is received by the central office, and the CPU of the central office
Under the control of (1), the received data is written and stored in a database having a vertical and horizontal table configuration (matrix configuration), and the stored data is read out and a predetermined arithmetic processing is performed.

【0002】このような処理を行うには、受信データが
多量であることからオペレータがデータベースを分割し
た分割データベースに格納するために受信データ数を把
握し、必要な分割データベースの数を算出したり等の作
業が必要なので手間がかかったり、CPUが受信データ
を検索してデータベースの何処に格納するかを認識する
処理が必要となったりするので、その処理に時間がかか
る。そこで、オペレータの手間を省き、アクセス処理時
間を短縮することのできる方式が要望されている。
In order to perform such processing, since the amount of received data is large, the operator grasps the number of received data in order to store it in a divided database, and calculates the required number of divided databases. Since such work is required, it takes time and labor, or the CPU needs to perform processing for recognizing where to store the received data and storing it in the database, and thus the processing takes time. Therefore, there is a demand for a method that saves the labor of the operator and shortens the access processing time.

【0003】[0003]

【従来の技術】多量のデータを処理する従来のCPUに
よるデータベースアクセス方式を、ダム諸量システムを
例にとって説明する。
2. Description of the Related Art A conventional database access method using a CPU for processing a large amount of data will be described by taking a dam various quantity system as an example.

【0004】ダム諸量システムは、各地に存在するダム
毎に設けられた局舎で収集される情報を更に1つの中央
局で収集し、この収集情報をデータベースに格納する構
成となっている。
The dam quantity system is constructed such that the information collected in the station buildings provided for each dam existing in various places is further collected in one central station and the collected information is stored in the database.

【0005】図13に1局舍におけるダム諸量システム
の概略ブロック構成図を、図14に局舍内のCPUによ
るデータ受信処理を説明するフローチャートを、図15
に正時情報演算用データテーブル図を、図16に局舍内
のCPUによる正時情報演算用データテーブルへのデー
タ格納処理を説明するフローチャートを示す。
FIG. 13 is a schematic block diagram of a dam quantity system in one station, and FIG. 14 is a flow chart for explaining a data receiving process by a CPU in the station.
FIG. 16 is a data table diagram for hourly information calculation, and FIG. 16 is a flow chart for explaining a data storage process in the data table for hourly information computation by the CPU in the station.

【0006】図13において、1は入力装置、2はCP
U、3はCPUのメモリ、4はファイル、5はコンソー
ル、6はプリンタ、7はディスプレイ等の卓、8はダム
のゲートである。
In FIG. 13, 1 is an input device and 2 is a CP
U, 3 is a memory of the CPU, 4 is a file, 5 is a console, 6 is a printer, 7 is a table such as a display, and 8 is a dumb gate.

【0007】最初に、雨量、河川水位、貯水位、開度、
放流量等のダム諸量関連のデータは秒単位にて入力装置
1に入力され、入力装置1から1分毎に局舍内のCPU
2に送信される。
First, rainfall, river water level, water storage level, opening,
Data related to dam amounts such as discharge amount are input to the input device 1 in units of seconds, and the CPU in the station is every 1 minute from the input device 1.
2 is sent.

【0008】ここで、CPU2によるダム諸量関連のデ
ータの受信処理を図14に示すフローチャートを参照し
て説明する。図14のステップS1に示すように、CP
U2は1分毎に受信した前記データをメモリ3内の図1
5に示す正時情報演算用データテーブル10に格納す
る。
Now, the process of receiving data relating to various dam quantities by the CPU 2 will be described with reference to the flow chart shown in FIG. As shown in step S1 of FIG.
U2 stores the data received every minute in the memory 3 as shown in FIG.
The data is stored in the hourly information calculation data table 10 shown in FIG.

【0009】正時情報演算用データテーブル10には、
水位(m) 11、貯水量(m3)12、放流量(m3/sec)13、
流入量(m3/sec)14、ゲート開度(mm)15、調整流量(m
3/sec)16等のデータ種別毎に、カウンタ17、積算値
18、最大値時刻19、最大値20、最小値時刻21、
最小値22、平均値23の領域が確保されている。
In the hourly information calculation data table 10,
Water level (m) 11, water storage (m 3 ) 12, discharge (m 3 / sec) 13,
Inflow (m 3 / sec) 14, Gate opening (mm) 15, Adjusted flow rate (m
3 / sec) 16 or the like for each data type such as counter 17, integrated value 18, maximum value time 19, maximum value 20, minimum value time 21,
The area of the minimum value 22 and the average value 23 is secured.

【0010】CPU2が1分毎にデータを受信して格納
すると、CPU2は図16のフローチャートにおけるス
テップS1に示すように、全ての入力データの種別毎に
以下の処理を行う。
When the CPU 2 receives and stores data every one minute, the CPU 2 performs the following processing for each type of all input data as shown in step S1 in the flowchart of FIG.

【0011】ステップS2に示すように、まずカウンタ
17をインクリメントし、ステップS3に示すように、
積算値18に入力データを加算する。次に、ステップS
4に示すように、ステップS3で加算された入力データ
が日情報の最初のデータであるかが判断される。この判
断結果がNO(N)の場合は、ステップS5に示すよう
に入力データが最大値20より大きいか否かが判断され
る。
As shown in step S2, first, the counter 17 is incremented, and as shown in step S3,
The input data is added to the integrated value 18. Next, step S
As shown in FIG. 4, it is determined whether the input data added in step S3 is the first date information. If the determination result is NO (N), it is determined whether the input data is larger than the maximum value 20 as shown in step S5.

【0012】この判断結果、入力データが最大値20よ
り大きいYES(Y)の場合は、ステップS6に示すよ
うに、データ入力時刻を最大値時刻19に格納し、ステ
ップS7に示すように入力データを最大値20に格納す
る。
As a result of the judgment, if the input data is YES (Y) larger than the maximum value 20, the data input time is stored in the maximum value time 19 as shown in step S6, and the input data is stored as shown in step S7. Is stored in the maximum value 20.

【0013】次に、ステップS8に示すように、入力デ
ータが最小値22より小さいYESの場合は、ステップ
S9に示すようにデータ入力時刻を最小値時刻21に格
納すると共に、ステップS10に示すように入力データ
を最小値22に格納する。
Next, as shown in step S8, if the input data is YES, which is smaller than the minimum value 22, the data input time is stored in the minimum value time 21 as shown in step S9, and as shown in step S10. The input data is stored in the minimum value 22.

【0014】また、ステップS4において、日情報の最
初の入力データであるYESの場合は、ステップS12
に示すようにデータ入力時刻を最大値時刻19及び最小
値時刻21に格納すると共に、ステップS13に示すよ
うに入力データを最大値20及び最小値22に格納す
る。
If YES in step S4, which is the first input data of the day information, in step S12.
The data input time is stored in the maximum value time 19 and the minimum value time 21 as shown in, and the input data is stored in the maximum value 20 and the minimum value 22 as shown in step S13.

【0015】このようにして図14のステップS1にお
ける格納処理が終了すると、ステップS2に示すように
現在が正時(毎時00分)であるかが判断される。この
判断結果がNOの場合は全体の処理が終了(END)と
なるが、YESの場合は、ステップS3に示すように、
正時情報演算用データテーブル10のデータを基に正時
情報の演算が行われる。即ち、CPU2は1分毎に受信
して1時間分集計した情報を基に、毎時00分に正時情
報の演算を行っている。
When the storage process in step S1 of FIG. 14 is completed in this way, it is determined whether the present time is hour (00 minute every hour) as shown in step S2. If the result of this determination is NO, the entire processing ends (END), but if YES, as shown in step S3,
The hour information is calculated based on the data in the hour information calculation data table 10. That is, the CPU 2 calculates the hourly information at every hour based on the information received every minute and totaled for one hour.

【0016】その正時情報の演算処理を図17に示すフ
ローチャートを参照して説明する。図17のステップS
1に示すように、全ての入力データの種別毎に以下の処
理を行う。
The arithmetic processing of the hourly information will be described with reference to the flowchart shown in FIG. Step S of FIG.
As shown in FIG. 1, the following processing is performed for each type of all input data.

【0017】ステップS2に示すように、データ種別毎
に、積算値18をカウンタ値17にて割った値を平均値
23として求め、ステップS3に示すように正時情報演
算用データテーブル10に格納する。
As shown in step S2, a value obtained by dividing the integrated value 18 by the counter value 17 is obtained as an average value 23 for each data type, and is stored in the hourly information calculation data table 10 as shown in step S3. To do.

【0018】次に、ステップS4に示すように全種別の
入力データを演算済であるかを判断し、この判断結果が
NOの場合は、ステップS2に戻って再び演算処理を行
い、YESの場合は演算を終える。
Next, as shown in step S4, it is determined whether or not the input data of all types have been calculated. If the result of this determination is NO, the process returns to step S2 to perform the calculation processing again, and if YES. Ends the calculation.

【0019】このように全データ種別の演算を終了する
と、図14のステップS4に示すように、その結果(カ
ウンタ17、積算値18、平均値23)をファイル4
(図13参照)に格納すると共に、ステップS5に示す
ように、中央局にその演算結果を送信する。
When the calculation of all data types is completed in this way, the result (counter 17, integrated value 18, average value 23) is stored in the file 4 as shown in step S4 of FIG.
(See FIG. 13), the calculation result is transmitted to the central station as shown in step S5.

【0020】次に、図14のステップS6に示すよう
に、現在が午前9時00分であるかが判断される。この
判断結果がNOの場合は全体の処理が終了(END)と
なるが、YESの場合は、ステップS7に示すように、
CPU2がファイル4から1日分の正時情報を読み込ん
で、ステップS8に示すように日情報の演算を行う。
Next, as shown in step S6 of FIG. 14, it is determined whether the current time is 9:00 am. If the result of this determination is NO, the entire processing ends (END), but if YES, as shown in step S7,
The CPU 2 reads the hourly information for one day from the file 4, and calculates the day information as shown in step S8.

【0021】即ち、CPU2は毎日午前9時00分に1
日分の正時情報(カウンタ値17、積算値18、平均値
23のみ)をファイル4からメモリ3に読み込み、この
情報を基に日情報の演算を行っている。
That is, the CPU 2 executes 1 at 9:00 am every day.
The hourly information for the day (only the counter value 17, the integrated value 18, and the average value 23) is read from the file 4 into the memory 3, and the day information is calculated based on this information.

【0022】この日情報の演算処理を図18に示すフロ
ーチャートを参照して説明する。図18のステップS1
に示すように、全ての入力データの種別毎に以下の処理
を行う。
The calculation processing of this day information will be described with reference to the flowchart shown in FIG. Step S1 of FIG.
As shown in, the following processing is performed for each type of all input data.

【0023】ステップS2に示すように、正時情報のカ
ウンタ値17を合計し、日情報のカウンタ値を算出し、
次に、ステップS3に示すように、正時情報の積算値1
8を合計し、日情報の積算値を算出する。
As shown in step S2, the counter values 17 of the hour information are summed to calculate the counter value of the day information,
Next, as shown in step S3, the integrated value 1 of the hour information is 1
8 is totaled and the integrated value of day information is calculated.

【0024】次に、ステップS4に示すように、日情報
の積算値を日情報のカウンタ値にて割った値を日情報の
平均値として求め、またステップS5に示すように、正
時情報演算用データテーブル10内の最大値20、最大
値時刻19、最小値22、最小値時刻21を日情報の最
大値、最大値時刻、最小値、最小値時刻とし、それぞれ
の値を図示せぬ日情報演算用データテーブルに格納す
る。
Next, as shown in step S4, a value obtained by dividing the integrated value of day information by the counter value of day information is obtained as an average value of day information, and as shown in step S5, hour information calculation is performed. The maximum value 20, the maximum value time 19, the minimum value 22, and the minimum value time 21 in the data table 10 are set as the maximum value, the maximum value time, the minimum value, and the minimum value time of the day information, and the respective values are not shown in the figure. Stored in the data table for information calculation.

【0025】次に、ステップS6に示すように全種別の
入力データを演算済であるかを判断し、この判断結果が
NOの場合は、ステップS2に戻って再び演算処理を行
い、YESの場合は演算を終える。
Next, as shown in step S6, it is determined whether or not the input data of all types have been calculated. If the result of this determination is NO, the procedure returns to step S2 to perform the arithmetic processing again, and if YES. Ends the calculation.

【0026】このように全データ種別の演算を終了する
と、図14のステップS9に示すように、その結果をフ
ァイル4に格納すると共に、ステップS10に示すよう
に、中央局にその演算結果を送信する。
When the calculation of all data types is completed in this way, the result is stored in the file 4 as shown in step S9 of FIG. 14 and the calculation result is transmitted to the central station as shown in step S10. To do.

【0027】次に、ステップS11に示すように、現在
が1か月の内の所定日の午前9時00分であるかが判断
される。この判断結果がNOの場合は全体の処理が終了
(END)となるが、YESの場合は、ステップS12
に示すように、CPU2がファイル4から1月分の正時
情報を読み込んで、ステップS13に示すように月情報
の演算を行う。
Next, as shown in step S11, it is determined whether the present time is 9:00 am on a predetermined day within one month. If the result of this determination is NO, the entire processing ends (END), but if YES, step S12.
As shown in, the CPU 2 reads the hourly information for January from the file 4 and calculates the month information as shown in step S13.

【0028】即ち、CPU2は毎月1日午前9時00分
に1月分の日情報をファイル4からメモリ3に読み込
み、この情報を基に月情報の演算を行っている。この月
情報の演算処理を図19に示すフローチャートを参照し
て説明する。
That is, the CPU 2 reads the day information for January from the file 4 into the memory 3 at 9:00 am on the first day of every month, and calculates the month information based on this information. The calculation process of the month information will be described with reference to the flowchart shown in FIG.

【0029】図19のステップS1に示すように、全て
の入力データの種別毎に以下の処理を行う。ステップS
2に示すように、日情報のカウンタ値を合計し、月情報
のカウンタ値を算出し、次にステップS3に示すよう
に、日情報の積算値を合計し、月情報の積算値を算出す
る。
As shown in step S1 of FIG. 19, the following processing is performed for each type of all input data. Step S
As shown in FIG. 2, the counter values of the day information are summed to calculate the counter value of the month information. Next, as shown in step S3, the integrated values of the day information are summed to calculate the integrated value of the month information. .

【0030】次に、ステップS4に示すように、月情報
の積算値を月情報のカウンタ値にて割った値を月情報の
平均値として求め、またステップS5に示すように、日
情報の最大値の中で最も大きい値を検索し、月情報の最
大値及び最大値時刻とすると共に、ステップS6に示す
ように、日情報の最小値の中で最も小さい値を検索し、
月情報の最小値及び最小値時刻とする。
Next, as shown in step S4, the value obtained by dividing the integrated value of the month information by the counter value of the month information is obtained as the average value of the month information, and as shown in step S5, the maximum of the day information is obtained. The largest value among the values is searched for as the maximum value and the maximum value time of the month information, and the smallest value among the minimum values of the day information is searched as shown in step S6.
It is the minimum value and the minimum value time of the month information.

【0031】次に、ステップS7に示すように全種別の
入力データを演算済であるかを判断し、この判断結果が
NOの場合は、ステップS2に戻って再び演算処理を行
い、YESの場合は演算を終える。
Next, as shown in step S7, it is judged whether or not the input data of all types have been calculated. If the result of this judgment is NO, the process returns to step S2 to perform the calculation process again, and if YES. Ends the calculation.

【0032】このように全データ種別の演算を終了する
と、図14のステップS14に示すように、その結果を
ファイル4に格納すると共に、ステップS15に示すよ
うに、中央局にその演算結果を送信する。
When the calculation of all data types is completed in this way, the result is stored in the file 4 as shown in step S14 of FIG. 14 and the calculation result is transmitted to the central station as shown in step S15. To do.

【0033】次に、ステップS16に示すように、現在
が1月1日の午前9時00分であるかが判断される。こ
の判断結果がNOの場合は全体の処理が終了(END)
となるが、YESの場合は、ステップS17に示すよう
に、CPU2がファイル4から1年分の正時情報を読み
込んで、ステップS18に示すように年情報の演算を行
う。
Next, as shown in step S16, it is determined whether or not the current time is January 1, 9:00 am. If the result of this determination is NO, the entire processing ends (END).
However, in the case of YES, the CPU 2 reads the hourly information for one year from the file 4 as shown in step S17, and calculates the year information as shown in step S18.

【0034】即ち、CPU2は毎年1月1日午前9時0
0分に1年分の月情報をファイル4からメモリ3に読み
込み、1年分の月情報を基に年情報の演算を行ってい
る。この年情報の演算は、図19を参照して説明した月
情報の演算と同一なのでその説明を省く。但し、図19
において、 "日情報" が "月情報" に、 "月情報" が "
年情報" に代わる。
That is, the CPU 2 makes every January 1 at 9:00 am
Month information for one year is read from the file 4 into the memory 3 at 0 minutes, and year information is calculated based on the month information for one year. Since the calculation of this year information is the same as the calculation of the month information described with reference to FIG. 19, its description is omitted. However, FIG.
In, "day information" is "month information" and "month information" is "
Replaces "year information".

【0035】年情報の全データ種別の演算を終了する
と、図14のステップS19に示すように、その結果を
ファイル4に格納すると共に、ステップS20に示すよ
うに、中央局にその演算結果を送信する。以上で局舎内
全体の処理が終了する。
When the calculation of all data types of the year information is completed, the result is stored in the file 4 as shown in step S19 of FIG. 14 and the calculation result is transmitted to the central station as shown in step S20. To do. This completes the processing of the entire station building.

【0036】また、ファイル4のメモリ容量は格納する
データの種類が多くなればなるほど増えるため、通常保
存期間、例えば正時情報は1ケ月間、日情報は1年間、
月情報は2年間、年情報は10年間を決めており、保存
期間を過ぎると新しいデータが上書きされるようになっ
ている。
Since the memory capacity of the file 4 increases as the number of types of data to be stored increases, the normal storage period, for example, hour information is one month, day information is one year,
Month information is set to 2 years and year information is set to 10 years, and new data is overwritten after the storage period.

【0037】この方法でファイル4内にデータを格納す
ると、ファイル4内のメモリ容量はほぼ限界に達する。
また、正時情報や日情報は日報に、月情報は月報に、年
情報は年報に用いられている。
When data is stored in the file 4 by this method, the memory capacity in the file 4 almost reaches the limit.
Hourly information and daily information are used for daily reports, monthly information for monthly reports, and year information for annual reports.

【0038】また、オペレータがコンソール5の操作に
よって、CPU2の演算結果をプリンタ6からプリント
アウト、また卓7に表示させ、これを参照することによ
ってダム設備の制御、例えばその1つであるゲート8の
制御が行われている。
Further, the operator operates the console 5 to print out the calculation result of the CPU 2 from the printer 6 and display it on the desk 7, and by referring to this, control of the dam equipment, for example, the gate 8 which is one of them. Is being controlled.

【0039】次に、図20に中央局におけるダム諸量シ
ステムの概略ブロック構成図を示し、その説明を行う。
図20において、25はCPU、26はCPUのメモ
リ、27はファイル、28はデータベース、29はコン
ソール、30はプリンタ、31はディスプレイ等の卓で
ある。
Next, FIG. 20 shows a schematic block configuration diagram of the dam various quantity system in the central office, and its explanation will be given.
In FIG. 20, reference numeral 25 is a CPU, 26 is a memory of the CPU, 27 is a file, 28 is a database, 29 is a console, 30 is a printer, 31 is a table such as a display.

【0040】CPU25には、上述した各地に存在する
局舍から定期的にダム諸量データが送信されてくる。そ
のダム諸量データは、データベース28に格納されるよ
うになっている。図21に行列構成のデータベース28
の構成の一例を示す。但し、ダム諸量データの正時情報
を格納する構成であるとする。
To the CPU 25, various dam amount data are periodically transmitted from the above-mentioned stations existing in various places. The dam amount data is stored in the database 28. FIG. 21 shows the database 28 of the matrix structure.
An example of the configuration will be shown. However, it is assumed that the structure stores the hourly information of dam various data.

【0041】中央局では各局舍から定期的に受信してい
るダム諸量データを、正時情報、日情報、月情報、年情
報別に図21に示すようなデータベース28内に格納し
ている。
At the central station, the various data of dams which are periodically received from each station are stored in the database 28 as shown in FIG. 21 by hour information, day information, month information and year information.

【0042】このようにデータベース28は横方向にか
なり長い。また中央局にダム諸量データを定期的に送信
している局舍の数が増えるほど、更に各局舍が中央局に
送信しているダム諸量データの水位、貯水量等のデータ
種別(以下データ名と呼ぶ)が増えるほど、データベー
ス28は横方向に長くなる。
As described above, the database 28 is considerably long in the lateral direction. In addition, as the number of stations that regularly transmit the dam volume data to the central station increases, the data types such as the water level and water storage of the dam volume data that each station station further transmits to the central station (hereinafter As the number of data names) increases, the database 28 becomes longer in the horizontal direction.

【0043】しかし通常のデータベース28には横方向
のデータ数(データバイト長)に制限がある。ダム諸量
データの数がデータベース28の横方向の許容データ数
より小さい場合は、図22に示すCPU25の機能の1
つであるアプリケーションプログラム(以下アプリと呼
ぶ)33が、特に問題無くデータベース28内にデータ
を書き込んだり、データベース28内のデータを読み込
むことが可能である。
However, the number of data in the horizontal direction (data byte length) is limited in the normal database 28. If the number of pieces of dam quantity data is smaller than the number of laterally allowable data in the database 28, one of the functions of the CPU 25 shown in FIG.
The application program 33 (hereinafter referred to as an application), which is one of the two, can write data in the database 28 or read data in the database 28 without any particular problem.

【0044】しかし、ダム諸量データの数がデータベー
ス28の横方向の許容データ数より大きい場合は、予め
データベース28を図22に示すように、横方向に必要
なだけ分割し(以下分割した個々のデータベースを表と
呼ぶ)、この分割された第1表1D〜第n表nDに、ア
プリ33がデータベースアクセスインタフェース34、
データベースアクセス手段35を介してデータを書き込
んだり、表1D〜表nDからデータを読み込んだりする
ことになる。
However, when the number of dam quantity data is larger than the allowable number of data in the lateral direction of the database 28, the database 28 is divided in advance in the lateral direction as shown in FIG. Database is referred to as a table), and the application 33 has a database access interface 34,
Data will be written or data will be read from Table 1D to Table nD via the database access unit 35.

【0045】ここで、CPU25のアプリ33が行う局
舍からのダム諸量データの受信処理を図23を参照して
説明する。システム立ち上げ時に中央局のオペレータ
は、図22に示すキーボード36の操作によって、1つ
の表の横方向に許容可能な最大データ数(以降8192
バイトとする)及び、局舍数、1時点に1局舍から受信
するダム諸量データの総データ数の最大値等から必要な
表の数を算出すると共に、各局舍毎また正時情報、日情
報、月情報、年情報が格納されているファイルの種別
(以下ファイルNoと呼ぶ)毎にどの表に格納するかを決
め、図24に示すようなアプリ33内の表名定義テーブ
ル37に定義する。
Now, the process of receiving the dam amount data from the station by the application 33 of the CPU 25 will be described with reference to FIG. When the system is started up, the operator of the central office operates the keyboard 36 shown in FIG. 22 to set the maximum allowable number of data in the horizontal direction of one table (hereinafter 8192).
Bytes) and the number of stations, and the required number of tables from the maximum value of the total number of data of various dam data received from one station at a time, etc., as well as the hourly information for each station, A table name definition table 37 in the application 33 as shown in FIG. 24 determines which table is to be stored for each file type (hereinafter referred to as a file No.) in which day information, month information, and year information are stored. Define.

【0046】この後、図23のステップS1に示すよう
に、各局舍からダム諸量データを受信する。ここでは局
舎Aからのデータが受信されたとする。次にステップS
2に示すように、アプリ33は、ファイルNo、局舍名
(例えばA)、年月日及び時刻(以下時刻情報と呼
ぶ)、水位、貯水量等のデータ名を読み込んだ後に、ス
テップS3に示すように、表名定義テーブル37より局
舍Aの該当ファイルNoの情報が格納されている表名(以
下表1Dとする)を読み込むと共に、ステップS4に示
すように、データベースアクセスインタフェース34を
通して表1Dをアクセスし、表1Dから順に該当時刻情
報を捜す。
After this, as shown in step S1 of FIG. 23, dam amount data is received from each station. Here, it is assumed that the data from the station building A is received. Next, step S
As shown in 2, the application 33 reads the data name such as the file number, the station name (for example, A), the date and time (hereinafter referred to as time information), the water level, and the stored water amount, and then proceeds to step S3. As shown in the table name definition table 37, the table name (hereinafter referred to as Table 1D) in which the information of the relevant file No. of the station A is stored is read, and the table is accessed through the database access interface 34 as shown in step S4. 1D is accessed, and the corresponding time information is searched in order from Table 1D.

【0047】次に、ステップS5に示すように、表1D
の該当時刻情報の領域内に受信した全てのデータを1つ
ずつ格納する。この格納手順は、まずステップS6に示
すように、データ名を1つ読み込み、ステップS7に示
すように、読み込んだデータ名の領域を左から順に検索
し、ステップS8に示すように、読み込んだデータ名に
該当する領域に該当する受信データを格納する。
Next, as shown in step S5, Table 1D
All the received data are stored in the corresponding time information area of 1. In this storage procedure, as shown in step S6, first, one data name is read, as shown in step S7, the area of the read data name is searched in order from the left, and as shown in step S8, the read data is read. The received data corresponding to the area corresponding to the first name is stored.

【0048】そして、ステップS9に示すように全ての
データ名に対して格納処理を終えたか否かを判断し、こ
の判断結果が終えていないNOの場合は、ステップS6
に戻って処理を継続し、終えたYESの場合は処理を終
了する。
Then, as shown in step S9, it is determined whether or not the storage processing has been completed for all the data names. If the result of this determination is NO, step S6
To continue the processing, and if the answer is YES, the processing is terminated.

【0049】なおデータベース28の縦方向のメモリ容
量は格納するデータの種類が多くなればなるほど増える
ため、通常保存期間、例えば正時情報は3ケ月間、日情
報は3年間、月情報は20年間、年情報は100年間を
決めており、保存期間を過ぎると新しいデータが上書き
されるようになっている。このようにデータベース28
内にデータを格納すると、データベース28内のメモリ
容量はほぼ限界に達する。なお正時情報や日情報は日報
に、月情報は月報に、年情報は年報に用いられている。
Since the vertical memory capacity of the database 28 increases as the number of types of data to be stored increases, the normal storage period, for example, hour information is 3 months, day information is 3 years, and month information is 20 years. The year information has been set to 100 years, and new data is overwritten when the storage period expires. Database 28
With the data stored therein, the memory capacity in the database 28 is almost reached. Hourly information and daily information are used for daily reports, monthly information for monthly reports, and year information for annual reports.

【0050】[0050]

【発明が解決しようとする課題】ところで、上述した中
央局におけるCPU25によるデータベースアクセス方
式においては、次に記述するような問題点があった。
By the way, the above-mentioned database access method by the CPU 25 in the central office has the following problems.

【0051】上述したように、システム立ち上げ時に
中央局のオペレータは1つの表に許容可能な最大データ
数及び局舍数、1時点に1局舍から受信するダム諸量デ
ータの総データ数の最大値等から必要な表(分割データ
ベース)の数を算出すると共に、各局舍毎またファイル
No毎にどの表に格納するかを決め、図24に示すような
アプリ33内の表名定義テーブル37に定義している
が、この定義を行うためのオペレータの作業には手間が
かかる問題があり、また、オペレータはアプリ33をそ
れぞれのダム諸量システムに適用する際にはアプリ33
内の表名定義テーブル37の内容を書き換える必要があ
り、この場合、アプリ33の内容をも変更しなおさなけ
ればならないので、その作業に手間がかかる問題があっ
た。
As described above, when the system is started up, the operator of the central station determines the maximum number of data and the number of stations that can be accepted in one table, and the total number of data of the dam amount data received from one station at a time. Calculate the required number of tables (divided databases) from maximum values, etc., and also for each station or file.
The table to be stored for each No is determined and defined in the table name definition table 37 in the application 33 as shown in FIG. 24. However, there is a problem that the work of the operator for making this definition is troublesome. Yes, and when the operator applies the app 33 to each dam quantity system,
It is necessary to rewrite the contents of the table name definition table 37 in this case, and in this case, the contents of the application 33 must be changed again, which causes a problem that the work is troublesome.

【0052】アプリ33は表名定義テーブル37から
表名を読み込んだ後、表の上から順に該当時刻情報を捜
す処理を行っているが、図21に示すように表の中には
通常かなりの数の時刻情報が存在し、特に下の方の時刻
情報の場合、検索に時間がかかる問題があった。
After reading the table name from the table name definition table 37, the application 33 performs a process of searching for the corresponding time information in order from the top of the table. However, as shown in FIG. There are a number of time information items, and particularly in the case of the lower time information item, there is a problem that the search takes time.

【0053】アプリ33は表の中から該当時刻情報を
検索した後、受信した全てのデータについて1つずつ該
当時刻情報の領域内からデータ名の領域を左から順に検
索する処理を行っているが、特にデータ名が沢山ある場
合、時刻情報の領域内からデータ名の領域を検索するの
に時間がかかる問題があった。
After searching the table for the relevant time information, the application 33 carries out a process for searching all the received data one by one from within the relevant time information area for the data name area. Especially, when there are many data names, it takes time to search the data name area from the time information area.

【0054】本発明は、このような点に鑑みてなされた
ものであり、CPUがデータベースに多量のデータを容
易に書き込み/読み出すことができるCPUによるデー
タベースアクセス方式を提供することを目的としてい
る。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a database access system by the CPU, which enables the CPU to easily write / read a large amount of data to / from the database.

【0055】[0055]

【課題を解決するための手段】図1に本発明の原理図を
示す。この図に示すCPUによるデータベースアクセス
方式は、各々が、連続した第1〜第m種別データに時刻
情報が付されたフォーマットの第1〜第nデータを一定
時間間隔で受信し、CPU25の制御によってデータベ
ース28を分割した行列構成の第1〜第n分割データベ
ース1D,2D,…,nDにアクセスするものである。
FIG. 1 shows the principle of the present invention. In the database access method by the CPU shown in this figure, each receives the 1st to nth data in a format in which the time information is added to the continuous 1st to mth type data at fixed time intervals, and by the control of the CPU 25. The first to n-th divided databases 1D, 2D, ..., ND having a matrix configuration obtained by dividing the database 28 are accessed.

【0056】本発明の特徴は、CPU25に、第1〜第
nデータの各々を、第1〜第n分割データベース1D〜
nDの何れに記憶するかを対応付けた第1テーブル37
と、第1〜第nデータ中の第1〜第m種別データに第1
〜第m種別データ番号を対応付け、第1〜第m種別デー
タ番号に第1〜第m種別データの最大データ長を対応付
けた第2テーブル44と、第1〜第n分割データベース
1D〜nDの列方向に順次配置される時刻情報の行毎
に、順次配列される第1〜第m種別データの各々の配置
位置である列アドレスを、第1〜第m種別データ番号に
対応付けた第3テーブル45と、第1〜第nデータの何
れかが受信された際に、第1テーブル37の対応関係か
ら受信データをどの第1〜第n分割データベース1D〜
nDに記憶するかを認識する第1変換手段40と、第1
変換手段40で認識された分割データベース1D〜nD
の先頭の時刻情報から受信データの時刻情報を減算して
差分時間Tnを求め、差分時間Tnに対応する分割デー
タベース1D〜nDのTn番目の行アドレスの行に受信
データを記憶することを認識する第2変換手段41と、
受信データの第1〜第m種別データに対応する第1〜第
m種別データ番号を第2テーブル44から求め、この求
められた第1〜第m種別データ番号に対応する列アドレ
スを第3テーブル45から求め、この求められた列アド
レスと第2変換手段41で認識された行アドレスとの行
列の交点を記憶アドレスとし、この記憶アドレスに受信
データの第1〜第m種別データを記憶する第3変換手段
42とをCPU25に具備して構成したことにある。
A feature of the present invention is that the CPU 25 is caused to store each of the first to nth data in the first to nth divided databases 1D to.
The first table 37 in which which of nD is to be stored is associated
And the first to mth data in the first to nth data
-The 2nd table 44 which matched the m-th classification data number and matched the maximum data length of the 1st-m-th classification data with the 1st-m-th classification data numbers, and the 1st-nth division databases 1D-nD. For each row of time information sequentially arranged in the column direction, the column address, which is the arrangement position of each of the first to mth type data sequentially arranged, is associated with the first to mth type data numbers. 3 table 45 and any one of the 1st to nth data is received, the first to nth division databases 1D to
first conversion means 40 for recognizing whether to store in nD;
Division databases 1D to nD recognized by the conversion means 40
It is recognized that the time information of the reception data is subtracted from the time information of the beginning of the to obtain the difference time Tn, and the reception data is stored in the row of the Tn-th row address of the divided databases 1D to nD corresponding to the difference time Tn. Second conversion means 41,
The first to mth type data numbers corresponding to the first to mth type data of the received data are obtained from the second table 44, and the column address corresponding to the obtained first to mth type data numbers is obtained in the third table. 45, the intersection of the matrix of the obtained column address and the row address recognized by the second conversion means 41 is used as a storage address, and the first to mth type data of the received data is stored at this storage address. The third conversion means 42 and the CPU 25 are included in the configuration.

【0057】このような構成によれば、大規模な行列構
成のデータベース1D〜nDであっても、受信データの
記憶アドレスを容易に検索することができるので、従来
のような、順列に従った検索を行うことによって時間が
かかるといったことを解消することができる。
According to this structure, the storage addresses of the received data can be easily retrieved even in the databases 1D to nD having a large-scale matrix structure. It is possible to solve the problem that it takes time by performing the search.

【0058】[0058]

【発明の実施の形態】以下、図面を参照して本発明の一
実施の形態について説明する。図2は本発明の一実施形
態のCPUによるデータベースアクセス方式を適用した
ダム諸量システムにおける中央局のCPU機能ブロック
構成図である。この図2において図22に示した従来例
の各部に対応する部分には同一符号を付し、その説明を
省略する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is a CPU functional block configuration diagram of the central office in the dam various quantity system to which the database access method by the CPU of one embodiment of the present invention is applied. In FIG. 2, parts corresponding to the respective parts of the conventional example shown in FIG. 22 are designated by the same reference numerals, and description thereof will be omitted.

【0059】図2に示す一実施形態が図22に示した従
来例と異なる点は、CPU25に新たに、第1変換手段
(表名変換ツール)40、第2変換手段(レコードNo変
換ツール)41、第3変換手段(データ名No変換ツー
ル)42、入出力管理プログラム43、第2テーブル
(データ名No定義テーブル)44、及び第3テーブル
(列名定義テーブル)45を設け、従来アプリ33内に
あった第1テーブル(表名定義テーブル)37をアプリ
33外に設けたことにある。
The embodiment shown in FIG. 2 is different from the conventional example shown in FIG. 22 in that the CPU 25 newly includes a first conversion means (table name conversion tool) 40 and a second conversion means (record No conversion tool). 41, a third conversion means (data name No conversion tool) 42, an input / output management program 43, a second table (data name No definition table) 44, and a third table (column name definition table) 45 are provided, and the conventional application 33 is provided. This is because the first table (table name definition table) 37 that was inside is provided outside the application 33.

【0060】図2に示す実施形態のアプリには、従来例
のアプリ33と区別するために符号33′を付す。図3
に入出力管理プログラム43がダム諸量システム立ち上
げ時に行う処理動作を説明するためのフローチャートを
示し、その説明を行う。
The application of the embodiment shown in FIG. 2 is denoted by reference numeral 33 'to distinguish it from the application 33 of the conventional example. FIG.
A flow chart for explaining the processing operation performed by the input / output management program 43 at the time of starting the dam various quantity system is shown and explained.

【0061】図3のステップS1に示すように、システ
ム立ち上げ時に中央局のオペレータが入力手段(キーボ
ード)36から1つの表(分割データベース)に許容可
能な最大データ数及び局舍数、1時点に1局舍から受信
するダム諸量データの総データ数の最大値及び受信する
可能性のあるダム諸量データの全てのデータ名等の情報
を入力すると、それを入出力管理プログラム43が受信
する。
As shown in step S1 of FIG. 3, when the system is started up, the operator of the central office can input the maximum number of data and the number of stations at one table (divided database) from the input means (keyboard) 36 at one time point. Input the maximum value of the total number of dam quantity data received from one station and all data names of dam quantity data that may be received, and the input / output management program 43 will receive it. To do.

【0062】これによって、ステップS2に示すよう
に、入出力管理プログラム43がステップS1の入力値
よりデータベース28における必要な表の数を算出する
と共に、ステップS3に示すように、各局舍毎またファ
イルNo毎にどの表に格納するかを決め、図24に示した
ような表名定義テーブル37に定義する。
As a result, as shown in step S2, the input / output management program 43 calculates the number of necessary tables in the database 28 from the input value of step S1, and also, as shown in step S3, for each station or file. Which table is stored for each No is determined and defined in the table name definition table 37 as shown in FIG.

【0063】次に、ステップS4に示すように、受信す
る可能性のあるダム諸量データの全てのデータ名等の情
報から各データ名毎にデータ名Noを決め、最大データ長
と共に図4にその一例を示すデータ名No定義テーブル4
4に格納する。
Next, as shown in step S4, a data name No is determined for each data name from the information such as all data names of dam quantity data that may be received, and the maximum data length is shown in FIG. Data name No definition table 4 showing an example
4 is stored.

【0064】次に、ステップS5に示すように、全ての
局舍に対し、各局舍毎また各ファイルNo毎に下記のステ
ップS6〜S10に示す手順にて、図5〜図7にその例
を示す列名定義テーブル45を定義する。
Next, as shown in step S5, for all the stations, for each station and for each file No., the example shown in FIGS. The column name definition table 45 shown is defined.

【0065】但し、図5は図24に示す局舎Aのファイ
ルNoが正時情報の場合の列名定義テーブル45の一例
図、図6は図24に示す局舎CのファイルNoが正時情報
の場合の列名定義テーブル45の一例図、図7は図24
に示す局舎FのファイルNoが正時情報の場合の列名定義
テーブル45の一例図である。
However, FIG. 5 shows an example of the column name definition table 45 when the file No. of the station A shown in FIG. 24 is hour information, and FIG. 6 shows the file No. of the station C shown in FIG. FIG. 24 shows an example of the column name definition table 45 for information.
It is an example figure of the column name definition table 45 when the file No. of the station building F shown in FIG.

【0066】ステップS6に示すように、図24に示す
表名定義テーブル37より各局舍毎また各ファイルNo毎
に定義された表名を左上から順に読み込む。次に、ステ
ップS7に示すように、ステップS6で読み込んだ局舍
名及びファイルNoに対して下記のステップS8及びS9
に示す手順にて列名定義テーブル45の全てのデータ名
Noについて各データNo毎に該当表内の列名を定義する。
As shown in step S6, the table names defined for each station and each file No. are read in order from the upper left from the table name definition table 37 shown in FIG. Next, as shown in step S7, the following steps S8 and S9 are applied to the station name and file No. read in step S6.
All data names in the column name definition table 45 by the procedure shown in
For No., define the column name in the corresponding table for each data No.

【0067】即ち、ステップS8に示すように、該当列
名定義テーブル45に最後に定義した列名に最後に定義
したデータNoの最大データ長(データ名No定義テーブル
44より読み込む)を加算して該当データ名Noの該当表
内の列名を算出し、列名定義テーブル45内の該当デー
タ名Noの列名領域に格納する。但し、最初の定義の場合
の列名は自動的に "0" となるようになっている。
That is, as shown in step S8, the maximum data length of the last defined data No (read from the data name No definition table 44) is added to the last defined column name in the corresponding column name definition table 45. The column name in the corresponding table of the corresponding data name No is calculated and stored in the column name area of the corresponding data name No in the column name definition table 45. However, the column name in the case of the first definition is automatically set to "0".

【0068】例えば、図4に示すデータ名No定義テーブ
ル44のデータ名Noが”1”の場合、その”1”は最初
に図5に示す列名定義テーブル45に列名を定義するた
めのデータ名Noなので、テーブル45の列名は”0”と
なる。
For example, when the data name No. of the data name No. definition table 44 shown in FIG. 4 is "1", the "1" is used to first define the column name in the column name definition table 45 shown in FIG. Since the data name is No, the column name of the table 45 is "0".

【0069】次に、データ名No”2”に定義される列名
は、その”0”にデータ名No”1”の最大データ長”1
80”を加算した”180”となる。その次に、データ
名No”3”に定義される列名は、その”180”にデー
タ名No”2”の最大データ長”175”を加算した”3
55”となる。以降同様に列名が定義される。
Next, the column name defined in the data name No. "2" has the maximum data length "1" of the data name No. "1" in its "0".
It becomes "180" by adding 80 ". Next, for the column name defined in the data name No" 3 ", the maximum data length" 175 "of the data name No" 2 "is added to the" 180 ". "3
55 ". The column name is defined in the same way thereafter.

【0070】次に、ステップS9に示すように、全ての
データ名Noについて列名の格納処理を終えたか否かを判
断し、この判断結果が終えていないNOの場合は、再び
ステップS8の処理を行い、終えたYESの場合はステ
ップS10に進む。
Next, as shown in step S9, it is determined whether or not the column name storage processing has been completed for all data name Nos. If the result of this determination is NO, the processing of step S8 is performed again. If YES, the process proceeds to step S10.

【0071】そして、ステップS10に示すように、全
ての局舎及び全てのファイルNoについて格納処理を終え
たか否かを判断し、この判断結果が終えていないNOの
場合は、ステップS6に戻り、終えたYESの場合は処
理を終了する。
Then, as shown in step S10, it is determined whether or not the storage processing has been completed for all station buildings and all file Nos. If the result of this determination is NO, the procedure returns to step S6. If YES, the process ends.

【0072】このような入出力管理プログラム43の処
理動作によれば、システム立ち上げ時に中央局のオペレ
ータが入力手段(キーボード)36から1つの表に許容
可能な最大データ数及び局舍数、1時点に1局舍から受
信するダム諸量データの総データ数の最大値及び受信す
る可能性のあるダム諸量データの全てのデータ名等の情
報を入力するだけで、次に記述するような効果がある。
According to the processing operation of the input / output management program 43 as described above, the maximum number of data and the number of stations that the operator of the central office can accept from the input means (keyboard) 36 in one table when the system is started up, 1 At this point, simply enter the maximum value of the total number of dam quantity data received from one station and all data names of dam quantity data that may be received. effective.

【0073】即ち、従来のように、システム立ち上げ時
に中央局のオペレータが1つの表に許容可能な最大デー
タ数及び局舍数、1時点に1局舍から受信するダム諸量
データの総データ数の最大値等から必要な表の数を算出
する必要が無くなると共に、各局舍毎またファイルNo毎
にどの表に格納するかを決め、図24に示すようなアプ
リ33内の表名定義テーブル37に定義する必要が無く
なる。
That is, as in the prior art, the maximum number of data and the number of stations allowed by the operator of the central station in one table at the time of system start-up, and the total data of various dam quantity data received from one station at a time It is not necessary to calculate the required number of tables from the maximum value of the number, etc., and which table to store for each station or file No. is decided, and the table name definition table in the application 33 as shown in FIG. There is no need to define it in 37.

【0074】また、オペレータがアプリ33をそれぞれ
のダム諸量システムに適用する際にアプリ33内の表名
定義テーブル37の内容を書き換える必要がなくなるの
で、アプリ33の内容をその書換えの都度変更しなおす
必要が無くなる。
Also, since the operator does not need to rewrite the contents of the table name definition table 37 in the app 33 when applying the app 33 to each dam quantity system, the contents of the app 33 are changed each time the rewriting is performed. There is no need to do this.

【0075】次に、上述したシステム立ち上げを終えた
後、実際に、ある局舍(以降局舍Aとする)からダム諸
量データを受信した場合にアプリ33′が行う処理手順
について図8に示すフローチャートを参照して説明す
る。
Next, after the system start-up described above is completed, the processing procedure performed by the application 33 'when the dam amount data is actually received from a certain station (hereinafter referred to as station A) will be described with reference to FIG. This will be described with reference to the flowchart shown in FIG.

【0076】まず、ステップS1に示すように、局舍A
からダム諸量データを受信したとする。この受信後にア
プリ33′は、ステップS2に示すように、受信データ
よりファイルNo(以降正時情報とする)、局舍名(局舍
A)、時刻情報、データ名を読み込む。
First, as shown in step S1, the station A
It is assumed that the dam various data is received from. After this reception, the application 33 'reads the file number (hereinafter referred to as hourly information), station name (station A), time information, and data name from the received data, as shown in step S2.

【0077】この後に、ステップS3に示すように、表
名変換ツール40を用いて表名定義テーブル37より局
舍Aの該当ファイルNo(正時情報)の情報が格納されて
いる表名(以下表1Dとする)を読み込む。
Thereafter, as shown in step S3, the table name conversion tool 40 is used to store the table name (hereinafter referred to as "hour information") of the corresponding file No. of the station A from the table name definition table 37. Table 1D) is read.

【0078】次に、ステップS4に示すように、データ
ベースアクセスインタフェース34を介して表1Dをア
クセスした後、レコードNo変換ツール41を用いて表1
Dの中から該当時刻情報のアドレスを算出する。
Next, as shown in step S4, after accessing the table 1D via the database access interface 34, the table 1D is accessed using the record No conversion tool 41.
The address of the relevant time information is calculated from D.

【0079】例えば受信データの局舍名を局舍A、ファ
イルNoを正時情報とし、また局舍名が局舍Aでファイル
Noが正時情報に該当する表の先頭に格納された受信デー
タの時刻情報が図21に示す1月1日 10:00であるとす
る。
For example, the station name of the received data is the station A, the file No is the hour information, and the station name is the file of the station A.
It is assumed that the time information of the received data stored at the top of the table corresponding to No. of hourly information is 10:00 on January 1st shown in FIG.

【0080】図21に示すように、以降1時間毎に正時
情報のデータを受信するので、受信したデータの時刻情
報と、表の先頭に格納された受信データの時刻情報との
時間差から表の何行目に格納すべきかを算出することが
可能である。
As shown in FIG. 21, since the hourly information data is received every hour thereafter, the time difference between the time information of the received data and the time information of the received data stored at the top of the table is used to calculate the time difference. It is possible to calculate which line of the line should be stored.

【0081】例えば2月1日11:00 の時刻情報のデータ
を受信した場合、表の先頭に格納された受信データの時
刻情報との時間差は、31日と1時間、即ち745時間
であり、表の746行目に格納すべきであることを算出
できる。
For example, when the time information data of 11:00 on February 1 is received, the time difference from the time information of the received data stored at the top of the table is 31 days and 1 hour, that is, 745 hours. It can be calculated that it should be stored in the 746th row of the table.

【0082】但し、データベース28内のデータには通
常保存期間がある。新しく受信したデータはデータベー
ス28に上書きされているが、表の先頭に格納されてい
るデータが丁度、保存期間だけ前の場合は表の先頭に上
書きされることになる。
However, the data in the database 28 has a normal storage period. The newly received data has been overwritten in the database 28, but if the data stored at the beginning of the table is exactly before the retention period, it will be overwritten at the beginning of the table.

【0083】これによって、従来の表の上から順に該当
時刻情報を検索するのに時間がかかる問題を解消するこ
とができる。次に、ステップS5に示すように、ステッ
プS4で算出した表1D内の該当時刻情報のアドレスの
領域内に受信した全てのデータ名をデータ名No変換ツー
ル42を用いて1つずつ格納する。この格納手順をステ
ップS6〜S10にて説明する。
As a result, it is possible to solve the problem that it takes time to retrieve the corresponding time information from the top of the conventional table. Next, as shown in step S5, all the received data names are stored one by one using the data name No conversion tool 42 in the area of the address of the corresponding time information in the table 1D calculated in step S4. This storage procedure will be described in steps S6 to S10.

【0084】ステップS6に示すように、受信したデー
タ名を1つ読み込む。この後、ステップS7に示すよう
に、データ名No変換ツール42を用いて読み込んだデー
タ名に該当するデータ名Noをデータ名No定義テーブル4
4より読み込む。
As shown in step S6, one received data name is read. After this, as shown in step S7, the data name No corresponding to the data name read using the data name No conversion tool 42 is set to the data name No definition table 4
Read from 4.

【0085】次に、ステップS8に示すように、データ
名No変換ツール42を用いて局舍AのファイルNo(正時
情報)に該当する列名定義テーブル45より読み込んだ
データ名Noに該当する列名を読み込み、ステップS9に
示すように、表1Dの該当時刻情報のアドレスの領域内
の読み込んだ列名に該当する領域に受信データを格納す
る。
Next, as shown in step S8, it corresponds to the data name No read from the column name definition table 45 corresponding to the file No. (hour information) of the station A using the data name No conversion tool 42. The column name is read, and as shown in step S9, the received data is stored in the area corresponding to the read column name in the area of the address of the relevant time information in Table 1D.

【0086】例えば受信データの局舍名を局舍A、ファ
イルNoを正時情報とする。受信したデータ名の水位・貯
水量・放流量・流入量・ゲート開度・調整流量…を1つ
ずつ読み込み、データ名No変換ツール42を用いて読み
込んだデータ名に該当するデータ名Noの1・2・3・4
・5・6…を、図4に示すデータ名No定義テーブル44
より読み込む。
For example, the station name of the received data is the station A and the file number is the hour information. The data name No. 1 corresponding to the data name read using the data name No conversion tool 42 is read one by one for the water level, stored water amount, discharge amount, inflow amount, gate opening, adjusted flow rate, etc. of the received data name.・ 2 ・ 3.4
・ 5, 6 ... Is the data name No definition table 44 shown in FIG.
Read more.

【0087】更にデータ名No変換ツール42を用いて局
舍AのファイルNoが正時情報に該当する図5に示す列名
定義テーブル45より読み込んだデータ名Noに該当する
列名の0・180・355・525・695・865…
を読み込み、読み込んだ列名に該当する図21に示す列
の領域(水位・貯水量…)に受信データを格納する。こ
れにより、従来の時刻情報の領域内からデータ名を検索
するのに時間がかかる問題を解消することができる。
Further, using the data name number conversion tool 42, the file number of the station A corresponds to the hourly information. The column name corresponding to the data name number read from the column name definition table 45 shown in FIG.・ 355 ・ 525 ・ 695/865 ...
And stores the received data in the area (water level / reserved water amount ...) Of the column shown in FIG. 21 corresponding to the read column name. As a result, it is possible to solve the conventional problem that it takes time to search for a data name in the time information area.

【0088】最後に、ステップS10に示すように、全
てのデータ名について格納処理を終えたか否かを判断
し、この判断結果が終えていないNOの場合は、ステッ
プS6に戻り、終えたYESの場合は処理を終了する。
Finally, as shown in step S10, it is determined whether or not the storage processing has been completed for all the data names. If the result of this determination is NO, then the procedure returns to step S6, and YES is reached. If so, the process ends.

【0089】このようなレコードNo変換ツール41及び
データ名No変換ツール42を用いたアプリ33の格納処
理によれば、従来において、アプリ33が図22に示し
たように自己内に設けられた表名定義テーブル37から
表名を読み込んだ後、図21に示したかなりの数の時刻
情報が存在する表の上から順に該当時刻情報を検索する
際に、特に下の方の時刻情報の場合に検索に時間がかか
るといったことを解消することができる。
According to the storage processing of the application 33 using the record No. conversion tool 41 and the data name No. conversion tool 42 as described above, in the conventional case, the application 33 has a table provided in itself as shown in FIG. After reading the table name from the name definition table 37, when searching for the relevant time information in order from the top of the table having a considerable number of time information shown in FIG. 21, especially in the case of the lower time information. It is possible to eliminate that it takes time to search.

【0090】更に、従来のアプリ33が先の表の中から
該当時刻情報を検索した後、受信した全てのデータにつ
いて1つずつ該当時刻情報の領域内からデータ名の領域
を左から順に検索する際に、特にデータ名が沢山ある場
合、時刻情報の領域内からデータ名の領域を検索するの
に時間がかかるといったことを解消することができる。
Further, after the conventional application 33 searches the corresponding time information from the above table, the data name areas are sequentially searched from the left of the corresponding time information area for all the received data. In this case, it is possible to solve the problem that it takes time to search the data name area from the time information area, especially when there are many data names.

【0091】次に、定義する列名定義テーブル45の数
を削減することによってCPU25のメモリ量の削減を
図る場合の説明を行う。システム立ち上げ時に、図8の
ステップS5〜S10において説明したように、入出力
管理プログラム43は全ての局舍に対し、各局毎又は各
ファイルNo毎に列名定義テーブル45をCPU25のメ
モリ内に定義しているが、ここで局舍数が増えるほど、
またデータ名の種類が増えるほどメモリ量は増えてい
く。しかし当然のことながらメモリ量には限界があり、
メモリ容量オーバーになることもあり得る。
Next, a description will be given of a case where the memory amount of the CPU 25 is reduced by reducing the number of column name definition tables 45 to be defined. When the system is started up, as described in steps S5 to S10 of FIG. 8, the input / output management program 43 stores the column name definition table 45 in the memory of the CPU 25 for each station or each file No. for all stations. I have defined it, but as the number of stations increases here,
In addition, the amount of memory increases as the type of data name increases. But of course there is a limit to the amount of memory,
The memory capacity may be exceeded.

【0092】図5及び図6に示す局舍Aと局舍Cの正時
情報のファイルNoの列名定義テーブル45は、表は異な
るが中身は全く同じである。図24の表名定義テーブル
37を見ると、1つの表には同一ファイルNoの2つの局
舍のデータを格納するようになっている。また図4のデ
ータ名No定義テーブル44を見ると、全ての局舍のデー
タや全てのファイルNoのデータにおいて、同一データ名
の最大データ長は同一に定義されているため、全ての列
名定義テーブル45の中身は2つのパターンしか存在し
ない。即ち、図5及び図6に示す列名定義テーブル45
のパターンと、図7に示す列名定義テーブル45のパタ
ーンしか存在しないことになる。
The column name definition table 45 of the file No of the hour information of the station A and the station C shown in FIG. 5 and FIG. 6 is different but the contents are exactly the same. Looking at the table name definition table 37 of FIG. 24, one table stores data of two stations having the same file number. Further, looking at the data name No definition table 44 of FIG. 4, since the maximum data length of the same data name is defined the same in all station data and all file No data, all column name definitions There are only two patterns in the table 45. That is, the column name definition table 45 shown in FIGS.
And the pattern of the column name definition table 45 shown in FIG. 7 exist.

【0093】よって上記のケースではシステム立ち上げ
時に、入出力管理プログラム43が列名定義テーブル4
5を2種類のみ定義するようにすればよい。また実際に
受信データを表に格納する際には局舍名からどちらのパ
ターンの列名定義テーブル45から列名を読み込めばよ
いかを判断した後に、データ名No変換ツール42を用い
て読み込んだデータ名Noに該当する列名を読み込めばよ
い。
Therefore, in the above case, when the system is started up, the input / output management program 43 causes the column name definition table 4
Only two types of 5 should be defined. Further, when actually storing the received data in the table, it is read from the station name after using the data name No conversion tool 42 after judging which pattern of the column name definition table 45 should be read. Read the column name corresponding to the data name No.

【0094】これによって、定義する列名定義テーブル
45の数を大幅に削減することができるので、CPU2
5のメモリ量を削減することができる。次に、ファイル
Noの種別毎にデータ名No定義テーブル44を定義するこ
とによってデータベース28内のメモリ量の削減を図る
場合の説明を行う。
As a result, the number of column name definition tables 45 to be defined can be greatly reduced.
The memory amount of 5 can be reduced. Then the file
A description will be given of a case where the amount of memory in the database 28 is reduced by defining the data name No definition table 44 for each No type.

【0095】例えば図7に示す列名定義テーブルの場
合、同一の局舍で同一のファイルNoの受信データをデー
タベース28内の表に格納する場合、横方向に3200
バイト必要なことが分かる。
For example, in the case of the column name definition table shown in FIG. 7, when the received data of the same file No. in the same station is stored in the table in the database 28, the horizontal direction is 3200.
I understand that I need a part-time job.

【0096】1つの表の横方向に許容可能な最大データ
数が8192バイトとすると、図24に示すように、横
方向には同一の局舍で同一のファイルNoの受信データを
2種類しか格納できないが、ここで局舍数が増えるほ
ど、またデータ名の種類が増えるほどデータベース28
内のメモリ量は増えていく。しかし当然のことながらメ
モリ量には限界があり、メモリ容量オーバーになること
もあり得る。
Assuming that the maximum allowable number of data in the horizontal direction of one table is 8192 bytes, as shown in FIG. 24, only two types of received data of the same file number are stored in the same station in the horizontal direction. No, but as the number of stations increases and the types of data names increase, the database 28
The amount of memory inside will increase. However, as a matter of course, the memory capacity is limited, and the memory capacity may be exceeded.

【0097】図4に示すデータ名No定義テーブル44に
おいては、全ての局舍のデータや全てのファイルNoのデ
ータにおいて、同一データ名の最大データ長は同一に定
義されている。
In the data name No definition table 44 shown in FIG. 4, the maximum data length of the same data name is defined to be the same for all station data and all file No data.

【0098】この最大データ長は、各データ名毎に全局
舍及び全ファイルNoのデータの中の最大のデータ長であ
り、局舍名やファイルNoが異なれば各データ名毎に最大
データ長は異なる。
This maximum data length is the maximum data length in the data of all stations and all file numbers for each data name. If the station name and file number are different, the maximum data length is different.

【0099】例えばファイルNoについて考えてみると、
積算値、カウンタ値については累計されていくために年
情報のファイルNoの最大データ長が最も長く、正時情報
の最大データ長が最も短くなる。また、局舍名について
考えてみると、ダムによって当然水位、貯水量等の値は
異なるために最大データ長も異なる。
For example, considering the file No.,
Since the accumulated value and the counter value are accumulated, the maximum data length of the file number of the year information is the longest, and the maximum data length of the hour information is the shortest. In addition, considering the name of the station, the maximum data length differs because the water level, the amount of water stored, etc. naturally differ depending on the dam.

【0100】図9にデータ名No定義テーブルの他例図、
図10に図24に示す局舎AファイルNoが正時情報の場
合の列名定義テーブル45の他例図、図11に図24に
示す局舎BファイルNoが正時情報の場合の列名定義テー
ブル45の他例図、図12に図24に示す局舎Cファイ
ルNoが正時情報の場合の列名定義テーブル45の他例図
を示す。
FIG. 9 shows another example of the data name No definition table,
FIG. 10 shows another example of the column name definition table 45 when the station A file No. shown in FIG. 24 is hourly information, and the column name when the station B file No. shown in FIG. 24 is hourly information FIG. 12 shows another example of the definition table 45, and FIG. 12 shows another example of the column name definition table 45 when the station C file No. shown in FIG. 24 is hour information.

【0101】図9に示すデータ名No定義テーブル44お
いては、ファイルNoによって同一データ名でも最大デー
タ長を変えた。これによって正時情報のファイルNoにつ
いては1つの表の横方向に局舍A,B,Cの3局舍分の
領域を確保することができ、これによりデータベース2
8内のメモリ量の削減につながる。
In the data name No definition table 44 shown in FIG. 9, the maximum data length is changed depending on the file No. even with the same data name. As a result, for the file number of the hour information, it is possible to secure areas for three stations A, B, and C in the lateral direction of one table.
8 leads to a reduction in the amount of memory.

【0102】但し、図9に示すデータ名No定義テーブル
44では全ての局舍のデータにおいて、同一データ名の
最大データ長は同一に定義してあるが、局舍によって変
えることも可能である。
However, in the data name No definition table 44 shown in FIG. 9, the maximum data length of the same data name is defined to be the same in the data of all stations, but it can be changed depending on the station.

【0103】なお、このような処理を用いると、前述し
たように削減する列名定義テーブル45の数を、システ
ム立ち上げ時にCPU25のメモリ上に必要なだけ増や
す必要がある。次に、データベース28の横方向に許容
可能なデータ数が同一局舍、同一ファイルNoの受信デー
タ数より小さい場合のデータベース28の分割処理につ
いて説明する。
If such a process is used, it is necessary to increase the number of column name definition tables 45 to be reduced as described above in the memory of the CPU 25 when the system is started up. Next, a description will be given of the division processing of the database 28 when the allowable number of data in the horizontal direction of the database 28 is smaller than the number of received data of the same station and the same file No.

【0104】今まではデータベース28の横方向に許容
可能なデータ数が同一局舍、同一ファイルNoの受信デー
タ数より大きい場合、即ち、図5〜図7では2局舍分の
受信データを、図10〜図12では3局舍分の受信デー
タをデータベース28内の同一行に格納可能である。
Up to now, when the allowable number of data in the horizontal direction of the database 28 is larger than the number of received data of the same station and the same file No., that is, in FIG. 5 to FIG. In FIGS. 10 to 12, the received data for three stations can be stored in the same row in the database 28.

【0105】しかし、同一局舍、同一ファイルNoの受信
データ数が極端に多かったり、またデータベース28の
横方向に許容可能なデータ数が少ない場合、同一局舍、
同一ファイルNoの受信データでもデータベース28内の
同一行に格納できない場合があり得る。
However, when the number of received data of the same station and the same file No is extremely large, or when the allowable number of data in the horizontal direction of the database 28 is small, the same station,
It may happen that the received data with the same file number cannot be stored in the same row in the database 28.

【0106】この場合、システム立ち上げ時に入出力管
理プログラム43が、中央局のオペレータがキーボード
36から入力した、1つの表に許容可能な最大データ数
及び局舍数、1時点に1局舍から受信するダム諸量デー
タの総データ数の最大値及び受信する可能性のあるダム
諸量データの全てのデータ名等の情報を受け取った後
に、これら入力値より必要な表の数を図3に示すステッ
プS2に示すように算出する。
In this case, when the system is started up, the input / output management program 43 causes the operator of the central office to input from the keyboard 36 the maximum number of data and stations allowable in one table, and one station at a time. Figure 3 shows the required number of tables from these input values after receiving the information such as the maximum value of the total number of dam quantity data to be received and all data names of dam quantity data that may be received. It is calculated as shown in step S2.

【0107】しかし、この時点で入出力管理プログラム
43が、同一局舍、同一ファイルNoの受信データでもデ
ータベース28内の同一行に格納できないと判断し、以
降同一局舍及び同一ファイルのデータ名毎にどの表に格
納するかを決め、表名定義テーブル37に定義すること
になるが、この場合の表名定義テーブル37の構成は図
24とは異なり、各局舍毎に作成され、縦軸には図24
と同様にファイルNoが、また横軸には新たにデータ名が
とられる。
However, at this point, the input / output management program 43 determines that the received data of the same station and the same file No cannot be stored in the same line in the database 28, and thereafter, the data names of the same station and the same file are not stored. The table name definition table 37 is defined in which table to store in, and the table name definition table 37 in this case is different in configuration from FIG. Figure 24
The file No. and the data name are newly taken on the horizontal axis.

【0108】その後、図3のステップS6に示すよう
に、その表名定義テーブルの左上より表名を読み込む
が、各局舍毎また各ファイルNo毎また各データ名毎に読
み込むことになる。
After that, as shown in step S6 of FIG. 3, the table name is read from the upper left of the table name definition table, but it is read for each station, each file number, and each data name.

【0109】これにより、データベース28の横方向に
許容可能なデータ数が同一局舍、同一ファイルNoの受信
データ数より小さい場合でも表の分割及びデータベース
28への格納が可能となる。
As a result, the table can be divided and stored in the database 28 even when the allowable number of data in the horizontal direction of the database 28 is smaller than the number of received data of the same station and the same file No.

【0110】以上説明した実施形態のCPUによるデー
タベースアクセス方式によれば以下に記述するような効
果がある。通常のデータベース28には横方向のデータ
数(データバイト長)に制限がある。各局舍が収集し、
中央局に送信されたダム諸量等のデータを中央局のCP
Uがデータベース28内に格納する際に、同一時刻の同
一ファイルNoや同一局舍のデータは、通常データベース
28内の同一行に格納しているが、データベース28の
横方向の許容可能な最大データ数がデータベース28内
の同一行に格納したいデータ数よりも小さい場合でも、
アプリ33′はデータベースアクセスインタフェース3
4を特に意識することなくデータベース28をアクセス
することが可能である。
According to the database access method by the CPU of the above-described embodiment, the following effects can be obtained. The normal database 28 has a limit on the number of data in the horizontal direction (data byte length). Collected by each station,
The data such as dam quantities sent to the central station are sent to the central station's CP.
When U is stored in the database 28, the data of the same file No and the same station at the same time are normally stored in the same line in the database 28, but the maximum allowable data in the horizontal direction of the database 28. Even if the number is smaller than the number of data to be stored in the same row in the database 28,
Application 33 'is database access interface 3
It is possible to access the database 28 without paying particular attention to 4.

【0111】また、アプリ33′は、受信データをデー
タベース28内に格納する際に、時刻情報をサーチする
ことなくそのアドレスを算出することができ、またデー
タ名をサーチすることなくその列名を読み込むことがで
きる。これによって、CPU25の負荷軽減及び処理時
間の短縮が可能となる。
Further, when storing the received data in the database 28, the application 33 'can calculate its address without searching the time information, and can also calculate the column name without searching the data name. Can be read. This makes it possible to reduce the load on the CPU 25 and reduce the processing time.

【0112】[0112]

【発明の効果】以上説明したように、本発明によれば、
CPUがデータベースに多量のデータを容易に書き込み
/読み出すことができる効果がある。
As described above, according to the present invention,
There is an effect that the CPU can easily write / read a large amount of data to / from the database.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の原理図である。FIG. 1 is a principle diagram of the present invention.

【図2】本発明の一実施形態のCPUによるデータベー
スアクセス方式を適用したダム諸量システムにおける中
央局のCPU機能ブロック構成図である。
FIG. 2 is a CPU functional block configuration diagram of a central office in the dam various quantity system to which the database access method by the CPU of one embodiment of the present invention is applied.

【図3】入出力管理プログラムがシステム立ち上げ時に
行う処理動作を説明するためのフローチャートである。
FIG. 3 is a flowchart for explaining a processing operation performed by the input / output management program at system startup.

【図4】データ名No定義テーブル例図である。FIG. 4 is an example diagram of a data name No definition table.

【図5】図24に示す局舎AのファイルNoが正時情報の
場合の列名定義テーブル例図である。
5 is an example diagram of a column name definition table when the file No. of the station A shown in FIG. 24 is hourly information.

【図6】図24に示す局舎CのファイルNoが正時情報の
場合の列名定義テーブル例図である。
FIG. 6 is an example diagram of a column name definition table when the file number of the station C shown in FIG. 24 is hourly information.

【図7】図24に示す局舎FのファイルNoが正時情報の
場合の列名定義テーブル例図である。
7 is an example diagram of a column name definition table when the file number of the station F shown in FIG. 24 is hourly information.

【図8】局舎Aからのダム諸量データ受信時にCPUの
アプリケーションプログラムが行う処理動作を説明する
フローチャートである。
FIG. 8 is a flowchart illustrating a processing operation performed by an application program of a CPU when receiving dam amount data from station A.

【図9】データ名No定義テーブルの他例図である。FIG. 9 is another example diagram of a data name No definition table.

【図10】図24に示す局舎AのファイルNoが正時情報
の場合の列名定義テーブルの他例図である。
FIG. 10 is another example diagram of the column name definition table when the file No. of the station A shown in FIG. 24 is hourly information.

【図11】図24に示す局舎BのファイルNoが正時情報
の場合の列名定義テーブル例図である。
FIG. 11 is an example diagram of a column name definition table when the file No. of the station B shown in FIG. 24 is hourly information.

【図12】図24に示す局舎CのファイルNoが正時情報
の場合の列名定義テーブルの他例図である。
12 is another example diagram of the column name definition table when the file No. of the station C shown in FIG. 24 is hour information.

【図13】1局舎におけるダム諸量システムの概略ブロ
ック構成図である。
FIG. 13 is a schematic block configuration diagram of a dam various quantity system in one station building.

【図14】局舎内のCPUによるデータ受信処理を説明
するためのフローチャートである。
FIG. 14 is a flowchart for explaining a data reception process by a CPU in a station building.

【図15】正時情報演算用データテーブル図である。FIG. 15 is a data table diagram for hourly information calculation.

【図16】局舎内のCPUによる正時情報演算用データ
テーブルへのデータ格納処理を説明するためのフローチ
ャートである。
FIG. 16 is a flowchart for explaining a data storage process in the hourly information calculation data table by the CPU in the station building.

【図17】局舎内のCPUによる正時情報演算処理を説
明するためのフローチャートである。
FIG. 17 is a flowchart for explaining hourly information calculation processing by a CPU in a station building.

【図18】局舎内のCPUによる日時情報演算処理を説
明するためのフローチャートである。
FIG. 18 is a flowchart for explaining date and time information calculation processing by the CPU in the station building.

【図19】局舎内のCPUによる月時情報演算処理を説
明するためのフローチャートである。
FIG. 19 is a flowchart for explaining a monthly information calculation process by the CPU in the station building.

【図20】中央局におけるダム諸量システムの概略ブロ
ック構成図である。
FIG. 20 is a schematic block configuration diagram of a dam various quantity system in the central office.

【図21】中央局のCPUのデータベースの一構成例図
である。
FIG. 21 is a diagram showing an example of the configuration of a database of the CPU of the central office.

【図22】従来の中央局のCPU機能ブロック構成図で
ある。
FIG. 22 is a CPU functional block configuration diagram of a conventional central office.

【図23】従来の中央局のCPUによるダム諸量データ
の受信処理を説明するためのフローチャートである。
FIG. 23 is a flow chart for explaining a conventional receiving process of dam amount data by the CPU of the central office.

【図24】表名定義テーブル図である。FIG. 24 is a table name definition table diagram.

【符号の説明】[Explanation of symbols]

25 CPU 28 データベース 36 入力手段(キーボード) 37 第1テーブル(表名定義テーブル) 40 第1変換手段(表名変換ツール) 41 第2変換手段(レコードNo変換ツール) 42 第3変換手段(データ名No変換ツール) 43 入出力管理手段(入出力管理プログラム) 44 第2テーブル(データ名No定義テーブル) 45 第3テーブル(列名定義テーブル) 1D〜nD 第1〜第n分割データベース 25 CPU 28 database 36 input means (keyboard) 37 first table (table name definition table) 40 first conversion means (table name conversion tool) 41 second conversion means (record No conversion tool) 42 third conversion means (data name) No conversion tool) 43 input / output management means (input / output management program) 44 second table (data name No definition table) 45 third table (column name definition table) 1D to nD first to nth divided databases

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 各々が、連続した第1〜第m種別データ
に時刻情報が付されたフォーマットの第1〜第nデータ
を一定時間間隔で受信し、CPUの制御によってデータ
ベースを分割した行列構成の第1〜第n分割データベー
スにアクセスするCPUによるデータベースアクセス方
式において、 前記第1〜第nデータの各々を、前記第1〜第n分割デ
ータベースの何れに記憶するかを対応付けた第1テーブ
ルと、 該第1〜第nデータ中の前記第1〜第m種別データに第
1〜第m種別データ番号を対応付け、該第1〜第m種別
データ番号に該第1〜第m種別データの最大データ長を
対応付けた第2テーブルと、 前記第1〜第n分割データベースの列方向に順次配置さ
れる前記時刻情報の行毎に、順次配列される該第1〜第
m種別データの各々の配置位置である列アドレスを、該
第1〜第m種別データ番号に対応付けた第3テーブル
と、 前記第1〜第nデータの何れかが受信された際に、前記
第1テーブルの対応関係から受信データをどの該第1〜
第n分割データベースに記憶するかを認識する第1変換
手段と、 該第1変換手段で認識された該分割データベースの先頭
の前記時刻情報から該受信データの時刻情報を減算して
差分時間Tnを求め、該差分時間Tnに対応する該分割
データベースのTn番目の行アドレスの行に該受信デー
タを記憶することを認識する第2変換手段と、 該受信データの第1〜第m種別データに対応する前記第
1〜第m種別データ番号を前記第2テーブルから求め、
この求められた第1〜第m種別データ番号に対応する前
記列アドレスを前記第3テーブルから求め、この求めら
れた列アドレスと該第2変換手段で認識された行アドレ
スとの行列の交点を記憶アドレスとし、この記憶アドレ
スに該受信データの第1〜第m種別データを記憶する第
3変換手段とを前記CPUに具備したことを特徴とする
CPUによるデータベースアクセス方式。
1. A matrix structure in which each receives first to nth data in a format in which time information is added to continuous first to mth type data at fixed time intervals, and a database is divided under the control of the CPU. In a database access method by a CPU for accessing the first to n-th divided databases, a first table in which each of the first to n-th data is stored in which of the first to n-th divided databases And the first to mth type data in the first to nth data are associated with the first to mth type data numbers, and the first to mth type data numbers are related to the first to mth type data. Of the first to m-th type data sequentially arranged for each row of the time information sequentially arranged in the column direction of the first to n-th divided databases. Each distribution Correspondence between the third table in which the column address that is the storage position is associated with the first to mth type data numbers, and the first table when any of the first to nth data is received. Which received data from which first
First conversion means for recognizing whether to store in the n-th divided database, and subtracting the time information of the received data from the time information at the head of the divided database recognized by the first conversion means to obtain a difference time Tn. Corresponding to second conversion means for recognizing and storing the received data in the row of the Tn-th row address of the divided database corresponding to the difference time Tn, and the first to m-th type data of the received data The first to mth type data numbers to be obtained from the second table,
The column address corresponding to the obtained first to mth type data numbers is obtained from the third table, and the intersection of the matrix of the obtained column address and the row address recognized by the second conversion means is determined. A database access method by a CPU, characterized in that the CPU is provided with a storage address, and third conversion means for storing the first to mth type data of the received data at the storage address.
【請求項2】 入力手段から入力された前記第1〜第n
データの名称及び数に応じて、前記第1テーブルに、該
第1〜第nデータの各々を前記第1〜第n分割データベ
ースの何れに記憶するかを対応付ける第1制御を行う入
出力管理手段を具備したことを特徴とする請求項1記載
のCPUによるデータベースアクセス方式。
2. The first to nth input from the input means
Input / output management means for performing first control in which the first table is stored in the first table according to the name and number of the data The database access method by the CPU according to claim 1, further comprising:
【請求項3】 前記入出力管理手段が、前記入力手段か
ら入力された前記第1〜第m種別データを前記第2テー
ブルに配列し、この配列された第1〜第m種別データ
に、前記第1〜第m種別データ番号を対応付け、該第1
〜第m種別データ番号に該第1〜第m種別データの最大
データ長を対応付ける第2制御を行うことを特徴とする
請求項2記載のCPUによるデータベースアクセス方
式。
3. The input / output management means arranges the first to m-th type data inputted from the input means in the second table, and the arranged first to m-th type data are arranged in the arranged table. The first to mth type data numbers are associated with each other and the first
3. The database access method by the CPU according to claim 2, further comprising: performing a second control in which the maximum data length of the first to mth type data is associated with the mth type data number.
【請求項4】 前記入出力管理手段が、前記第2制御を
行った後、前記第1〜第m種別データ番号を前記第3テ
ーブルに配列し、この配列された第1〜第m種別データ
番号の先頭である第1種別データ番号に前記列アドレス
の”0”を対応付け、第2種別データ番号に該”0”と
前記第2テーブルの第1種別データの最大データ長との
加算値を該列アドレスとして対応付け、以降、対応付け
が行われる種別データ番号よりも1つ小さい番号の種別
データ番号に対応付けられた該列アドレスの値と該第2
テーブルにおける該1つ小さい番号の種別データの最大
データ長との加算値を該列アドレスとして対応付ける制
御を行うことを特徴とする請求項3記載のCPUによる
データベースアクセス方式。
4. The input / output management means, after performing the second control, arranges the first to mth type data numbers in the third table and arranges the arranged first to mth type data. The first type data number at the beginning of the number is associated with "0" of the column address, and the second type data number is added with "0" and the maximum data length of the first type data of the second table. As the column address, and thereafter, the value of the column address associated with the type data number one smaller than the type data number with which the association is performed and the second
4. The database access method by the CPU according to claim 3, wherein control is performed such that a value added to the maximum data length of the type data having the next smaller number in the table is associated as the column address.
【請求項5】 前記第1〜第nデータにあって前記第1
〜第m種別データの最大データ長が等しい場合、前記入
出力管理手段が、該最大データ長の等しい第1〜第nデ
ータに係わる前記第3テーブルを1つのみ定義し、この
定義された第3テーブルを前記第3変換手段が共通に用
いるようにしたことを特徴とする請求項4記載のCPU
によるデータベースアクセス方式。
5. The first to nth data in the first
-When the maximum data lengths of the mth type data are equal, the input / output management means defines only one of the third tables related to the first to nth data having the same maximum data length, and the defined third 5. The CPU according to claim 4, wherein three tables are commonly used by the third conversion means.
Database access method by.
【請求項6】 前記第2テーブルに定義される前記第1
〜第m種別データの最大データ長を実データ長としたこ
とを特徴とする請求項1〜5の何れかに記載のCPUに
よるデータベースアクセス方式。
6. The first defined in the second table
The database access method by CPU according to any one of claims 1 to 5, wherein the maximum data length of the m-th type data is an actual data length.
JP7341568A 1995-12-27 1995-12-27 Data base access system by cpu Withdrawn JPH09179882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7341568A JPH09179882A (en) 1995-12-27 1995-12-27 Data base access system by cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7341568A JPH09179882A (en) 1995-12-27 1995-12-27 Data base access system by cpu

Publications (1)

Publication Number Publication Date
JPH09179882A true JPH09179882A (en) 1997-07-11

Family

ID=18347083

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7341568A Withdrawn JPH09179882A (en) 1995-12-27 1995-12-27 Data base access system by cpu

Country Status (1)

Country Link
JP (1) JPH09179882A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6604095B1 (en) 1999-09-21 2003-08-05 International Business Machines Corporation Method, system, program, and data structure for pivoting columns in a database table
US6748389B1 (en) 1999-09-21 2004-06-08 International Business Machines Corporation Method, system, and program for inverting columns in a database table
US6920443B1 (en) 1999-09-21 2005-07-19 International Business Machines, Corporation Method, system, program, and data structure for transforming database tables
US6965888B1 (en) 1999-09-21 2005-11-15 International Business Machines Corporation Method, system, program, and data structure for cleaning a database table using a look-up table
US7120638B1 (en) 1999-09-21 2006-10-10 International Business Machines Corporation Method, system, program, and data structure for cleaning a database table
JP2015166930A (en) * 2014-03-03 2015-09-24 ヤフー株式会社 Data processing device, data processing method, and data processing program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6604095B1 (en) 1999-09-21 2003-08-05 International Business Machines Corporation Method, system, program, and data structure for pivoting columns in a database table
US6748389B1 (en) 1999-09-21 2004-06-08 International Business Machines Corporation Method, system, and program for inverting columns in a database table
US6920443B1 (en) 1999-09-21 2005-07-19 International Business Machines, Corporation Method, system, program, and data structure for transforming database tables
US6965888B1 (en) 1999-09-21 2005-11-15 International Business Machines Corporation Method, system, program, and data structure for cleaning a database table using a look-up table
US7120638B1 (en) 1999-09-21 2006-10-10 International Business Machines Corporation Method, system, program, and data structure for cleaning a database table
US7249151B2 (en) 1999-09-21 2007-07-24 International Business Machines Corporation Method, system, program, and data structure for cleaning a database table
JP2015166930A (en) * 2014-03-03 2015-09-24 ヤフー株式会社 Data processing device, data processing method, and data processing program

Similar Documents

Publication Publication Date Title
Zangwill From EOQ towards zi
US5572726A (en) Electronic filing apparatus
WO1990003008A1 (en) Method and apparatus for accessing and manipulating time series
JPH09179882A (en) Data base access system by cpu
US7209887B2 (en) Auto allocation swap system
US7269589B2 (en) Database managing method and system having data backup function and associated programs
US7395276B2 (en) Systems and methods for resolving telephone number discrepancies en masse
US5666527A (en) System for dynamically changing logical data structure of database
US5649191A (en) Information searching apparatus for managing and retrieving document data stored in a storage unit
JP3552339B2 (en) Database system
US5500887A (en) Data access method for subscriber location information
US6085036A (en) Data base structure and management
JPH07225709A (en) Data base updating system
US7940895B2 (en) Methods and computer program products for tracking modifications in physical plant during maintenance of a communication network
CA2027231C (en) Computing system for data processing apparatus
Clemons Database Design for Decision Support
EP0741348A2 (en) Order control apparatus capable of reducing input operation by an input unit
JPH09292986A (en) Part extraction method
JPH11306245A (en) Management system and method for delivery date of product and recording medium
JPH07306865A (en) Information terminal device
JPH07104804B2 (en) Database generation management method
US20040193604A1 (en) Systems and methods for restricting a telephone number's availability for assignment
JP2003099681A (en) Loan period management system and method
JPH08129595A (en) Device and method for salary management
JP3234718B2 (en) Character information display processing device depending on date and time

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20030304