JP3865197B2 - Database access processing method - Google Patents

Database access processing method Download PDF

Info

Publication number
JP3865197B2
JP3865197B2 JP2000297919A JP2000297919A JP3865197B2 JP 3865197 B2 JP3865197 B2 JP 3865197B2 JP 2000297919 A JP2000297919 A JP 2000297919A JP 2000297919 A JP2000297919 A JP 2000297919A JP 3865197 B2 JP3865197 B2 JP 3865197B2
Authority
JP
Japan
Prior art keywords
database
data
application
logical
items
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.)
Expired - Fee Related
Application number
JP2000297919A
Other languages
Japanese (ja)
Other versions
JP2002108669A (en
Inventor
千昌 中島
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.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co 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 Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2000297919A priority Critical patent/JP3865197B2/en
Publication of JP2002108669A publication Critical patent/JP2002108669A/en
Application granted granted Critical
Publication of JP3865197B2 publication Critical patent/JP3865197B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、モバイルコンピュータなど小型の携帯端末上で稼動するシステムにおいて、処理性能を向上させる際に重要な要素となるデータベースの定義方法、及びデータベースへのアクセス処理方法に関する。
【0002】
【従来の技術】
データベースを使用したシステム開発では、システムの処理性能を向上させる過程でデータベースへのアクセス処理時間の対策が不可欠となる。例えば、画面表示処理及び画面終了処理において、データベースへのアクセスに要する処理時間は、画面表示に要する処理時間と比較して比重が大きいといえる。従って、データベースへのアクセス処理時間を短縮することが、全体の処理時間の短縮に最も有効な手段となる。
【0003】
また、データベースを使用したシステムにおいて、使用されるデータベースのモデルは、コンピュータの処理性能の高速化から、クエリの最適化、並列処理、及びデータの分散化等の高度な機能を備えたリレーショナルデータベースが主流となっている。リレーショナルデータベースが広く支持されてきた理由は、データベースの物理的な構造が隠され、アプリケーションは二次元の単純な表としての論理的な構造のみを意識すれば、SQLという非手続き型の問い合わせ言語により必要とするデータを容易にアクセスできることにある。
【0004】
【発明が解決しようとする課題】
モバイルコンピュータなどとして使用する小型の携帯端末は、より持ち歩きやすくするためにコンピュータ本体の大きさを小型化し、より長時間のバッテリー駆動を可能にするために低消費電力のCPUを使用している。その結果、ノート型のコンピュータと比較して、より高い携帯性とより効率的なパワーマネージメントを実現している。その反面、前記の低消費電力CPUの処理性能は、ノート型のコンピュータに搭載されるCPUと比較して低速であるという弱点がある。このような環境で動作するシステム開発においてリレーショナルデータベースを使用する場合、CPUの処理性能がネックとなるため、データベースへのアクセス処理の性能を確保するには、I/O数を抑えるためのテーブル構造の見直し、及び項目の統合を行い物理的なカラム数を最小限にするためのレコード構造の見直しといったデータベース設計が必要となる。
【0005】
アプリケーションの製造工程は、データベース設計が完了してから着手するのが一般的だが、携帯端末上で稼動するシステムの開発では、データベースへのアクセス処理性能を常に意識しなければならず、データベースの再設計が随時発生することになり、テーブル構造の見直しが発生する度に、多大な修正工数が発生するという問題がある。
【0006】
また、データベースに定義する性能を考慮したデータ構造とアプリケーションが使用するのに適しているデータ構造とが異なる場合、アプリケーションはデータベースに定義している物理的なデータ構造を意識することになり、データベースの物理的な構造を隠すことが可能であるというリレーショナルデータベースの長所を活用できなくなるという問題がある。
【0007】
本発明の目的は、データベースに定義された物理的な構造をアプリケーションが意識せずに、データベースからのデータの参照、及びデータベースへのデータの追加、更新、及び削除処理を一括して管理するデータベースアクセス処理方法を提供することである。
【0008】
【課題を解決するための手段】
上記目的を達成するために、請求項1に係る発明は、データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、前記アプリケーションから前記データベースを参照または更新するとき、前記データベースに定義された前記物理的な構造を前記アプリケーションが使用する前記論理的な構造へ変換し、または前記アプリケーションが使用する前記論理的な構造を前記データベースに定義された前記物理的な構造へ変換するステップを備えたことを特徴とする。
【0009】
請求項2に係る発明は、データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、前記アプリケーションから前記データベースを参照するときに、前記データベースに対してアクセスするべきデータのアクセス情報として、テーブルID及びアクセスキーを前記アプリケーションから取得するステップと、前記テーブルID及びアクセスキーを用いて前記データベースから対象データを検索するステップと、検索された対象データを、前記データベースに定義された前記物理的な構造から前記アプリケーションが使用する前記論理的な構造へ変換するステップと、前記論理的な構造とした対象データを前記アプリケーションへ返すステップとを備えたことを特徴とする。
【0010】
請求項3に係る発明は、データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、前記アプリケーションから前記データベースにデータを追加するときに、前記データベースに対してアクセスするべきデータのアクセス情報として、テーブルID、アクセスキー、及び追加データを前記アプリケーションから取得するステップと、前記追加データを、前記アプリケーションが使用する前記論理的な構造から前記データベースに定義された前記物理的な構造へ変換するステップと、前記テーブルID及びアクセスキーを用いて前記データベースに対象データを追加するステップとを備えたことを特徴とする。
【0011】
請求項4に係る発明は、データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、前記アプリケーションから前記データベースデータを更新するときに、前記データベースに対してアクセスするべきデータのアクセス情報として、テーブルID、アクセスキー、及び更新データを前記アプリケーションから取得するステップと、前記更新データを、前記アプリケーションが使用する前記論理的な構造から前記データベースに定義された前記物理的な構造へ変換するステップと、前記テーブルID及びアクセスキーを用いて前記更新データで前記データベースの対象データを更新するステップとを備えたことを特徴とする。
【0012】
請求項5に係る発明は、請求項1から4の何れか1つに記載のデータベースアクセス処理方法において、前記データベースの参照データを前記アプリケーションに返すとき、または前記アプリケーションから追加/更新データを前記データベースに渡すとき、それらのデータの格納場所を示すポインタを授受することでデータの授受を行うことを特徴とする。
【0013】
【発明の実施の形態】
以下、本発明の実施の形態について図面に従って説明する。
【0014】
図1は、本発明の実施の形態に係る携帯端末の構成を示すブロック図である。この携帯端末は、図1に示すように、CPU105及び内部記憶装置106を有する処理装置101と、業務データを格納しているデータベース107を有する外部記憶装置102と、データの表示装置として使用するディスプレイ103と、データの入力装置として使用するタッチペン104とを備えている。
【0015】
処理装置101内のCPU105及び内部記憶装置106は、携帯端末をより持ち歩きやすくするために、小型かつ低消費電力のものを使用している。また、ディスプレイ103は、タッチペン104を使用したタップ操作による入力を可能としているため、ここでは入力装置としてキーボードは使用しない。本実施の形態では、このような携帯端末を例とするが、もちろん一般的な表示機能のみのディスプレイとキーボードを備えた携帯端末であってもよい。
【0016】
図2は、データベースアクセスモジュールとアプリケーションの処理構成図である。図1の携帯端末において、個々の処理が使用するデータの構造と、個々の処理に適したデータ構造に変換されている様子を示している。以下、データベース107に定義された物理的な構造を物理構造205と、アプリケーションが使用する論理的な構造を論理構造206と呼ぶ。
【0017】
内部記憶装置106には、アプリケーション201、データ領域202、データベース参照モジュール203、及びデータベース更新モジュール204が、記憶あるいは確保されている。アプリケーション201は、データを操作するための領域としてデータ領域202を確保している。
【0018】
個々の処理で使用するデータ構造は、破線で示したように論理構造206を使用する処理群と物理構造205を使用する処理群に大別することができる。つまり、データベース107に対してテーブル定義の見直し等の原因により物理構造205に変更があった場合、データベース参照モジュール203の物理定義及びデータベース更新モジュール204の物理定義に対する改修に絞られるため、データベース107の変更に対する極めて柔軟な対応を可能とした処理構成となっている。
【0019】
図3は、データベースアクセスモジュールとアプリケーションの処理内容を示すフローチャートである。データベース107より取得したデータをディスプレイ103に表示し、入力データをデータベース107に反映する更新処理を例として、図2の処理構成図を用いて説明する。
【0020】
まず、アプリケーション201は、データベース参照モジュール203を起動する(ステップ301)。この際、アプリケーション201が確保しているデータ領域202のポインタを引き渡す。
【0021】
起動されたデータベース参照モジュール203は、データベース107から対象データを取得して、取得したデータをデータ領域202へ格納する(ステップ302)。格納処理が終了した時点で、データベース参照モジュール203を終了し、アプリケーション201の処理を継続する。
【0022】
データをディスプレイ103に表示する場合、アプリケーション201はデータ領域202に格納されている論理構造206のデータを使用する(ステップ303)。また、ディスプレイ103においてタッチペン104による入力があった場合、アプリケーション201は入力されたデータでデータ領域202を更新する(ステップ304)。次に、入力データをデータベース107へ反映するために、データベース更新モジュール204を起動する(ステップ305)。この際、入力データを格納しているデータ領域202のポインタを引き渡す。
【0023】
起動されたデータベース更新モジュール204は、データ領域202に格納された対象データを取得して、取得したデータでデータベース107を更新する(ステップ306)。更新処理が終了した時点で、データベース更新モジュール204を終了し、アプリケーション201の処理は完了する。
【0024】
次に、データベース参照モジュール203とデータベース更新モジュール204の処理内容の詳細を、図4及び図5のフローチャートを使用して説明する。
【0025】
図4は、データベース参照モジュール203の処理内容を示すフローチャートである。アプリケーション201から起動されたデータベース参照モジュール203は、アプリケーション201から引数としてアクセス情報408を取得する(ステップ401)。アクセス情報408には、対象のテーブルID、対象データのアクセスキー、アクセス方法、及び、参照データの格納場所を示すポインタをセットする。ここでは、アクセス方法には「参照」が設定されている。
【0026】
次に、テーブルID及びアクセスキーを使用したSQLを発行して、データベース107から対象データを検索する(ステップ402)。ここで、データベース107に対象データが存在するか判定する(ステップ403)。対象データが存在しなかった場合は、処理が失敗したと判断し、ステップ407へジャンプする。対象データが存在した場合は、データベース107から対象データを物理構造205で取得する(ステップ404)。更に、取得したデータを物理構造205から論理構造206へ変換する(ステップ405)。そして、論理構造206へ変換した取得データを、ポインタで指定されたデータ領域202に格納する(ステップ406)。
【0027】
最後に、処理結果409を戻り値としてアプリケーション201へ返す(ステップ407)。処理結果409には、成功または失敗を示す識別情報をセットする。
【0028】
図5は、データベース更新モジュール204の処理内容を示すフローチャートである。アプリケーション201から起動されたデータベース更新モジュール204は、アプリケーション201から引数としてアクセス情報514を取得する(ステップ501)。アクセス情報514には、対象のテーブルID、対象データのアクセスキー、アクセス方法、追加/更新データの格納場所を示すポインタをセットする。アクセス方法には、追加、更新、及び削除等の情報が設定される。次に、アクセス方法の判定結果で処理が分岐する(ステップ502)。アクセス方法が追加の場合はステップ503へ、更新の場合はステップ507へ、削除の場合はステップ511へ分岐する。
【0029】
まず、アクセス方法が追加の場合の処理内容を説明する。最初に、データベース107に対象データが存在するか判定する(ステップ503)。対象データが存在した場合、キーが重複するため処理が失敗したと判断し、ステップ513へジャンプする。対象データが存在しなかった場合は、ポインタで指定されたデータ領域202から、論理構造206の追加データを取得する(ステップ504)。更に、取得した追加データを論理構造206から物理構造205へ変換する(ステップ505)。そして、テーブルID及びアクセスキーを使用したSQLを発行して、物理構造205へ変換した追加データをデータベース107へ追加する(ステップ506)。
【0030】
次に、アクセス方法が更新の場合の処理内容を説明する。最初に、データベース107に対象データが存在するか判定する(ステップ507)。対象データが存在しなかった場合、処理が失敗したと判断し、ステップ513へジャンプする。対象データが存在した場合は、ポインタで指定されたデータ領域202から、論理構造206の更新データを取得する(ステップ508)。更に、取得した更新データを論理構造206から物理構造205へ変換する(ステップ509)。そして、テーブルID及びアクセスキーを使用したSQLを発行して、物理構造205へ変換した更新データでデータベース107へ更新する(ステップ510)。
【0031】
更に、アクセス方法が削除の場合の処理内容を説明する。最初に、データベース107に対象データが存在するか判定する(ステップ511)。対象データが存在しなかった場合、処理が失敗したと判断し、ステップ513へジャンプする。対象データが存在した場合はテーブルID及びアクセスキーを使用したSQLを発行して、データベース107から対象データを削除する(ステップ512)。
【0032】
最後に、追加、更新、及び削除処理における処理結果515を戻り値としてアプリケーション201へ返す(ステップ513)。処理結果515には、成功または失敗を示す識別情報をセットする。
【0033】
次に、図4のステップ405、図5のステップ505及びステップ509におけるデータ構造の変換処理の詳細を、図6の説明図を使用して説明する。
【0034】
図6は、物理定義、及び論理定義の概要構成を説明するための説明図である。データベース参照モジュール203とデータベース更新モジュール204には、データベース107に定義されているテーブル群の構造体が、物理定義603及び論理定義601として定義してある。それぞれの構造の定義例は、ソースコード602及びソースコード604に示す。データ構造を変換する場合、ソースコード602及びソースコード604を使用して変換処理を行う。
【0035】
次に、テーブル構造の見直しが発生した場合の改修手順を、図7のフローチャートと図8の説明図を使用して説明する。
【0036】
図7は、テーブル構造の見直しが発生した場合の改修手順を示すフローチャートである。テーブル構造の見直しは、性能向上等の対策として発生すると考えられる(ステップ701)。まず、テーブル構造の見直し結果を、データベース107のテーブル定義へ反映させる(ステップ702)。次に、データベース参照モジュール203とデータベース更新モジュール204の物理定義603を修正する(ステップ703、ステップ704)。以上の手順で、改修作業は完了する。物理構造205を使用している部分のみが修正の対象となるため、アプリケーション201に対する修正作業は発生しない。
【0037】
図8は、物理定義の変更例を説明するための説明図である。例えば、見直し前の項目X801と項目Y802を、見直し後の項目Z804に統合するとする。データベース参照モジュール203とデータベース更新モジュール204では、見直し前のソースコード803及び見直し後のソースコード804に示すように、構造体に定義している項目名及び桁数をそれぞれ修正する。以上が、データベース参照モジュール203とデータベース更新モジュール204に対する修正内容である。この物理定義の変更に伴って、アプリケーション201に対する修正作業は発生しない。
【0038】
【発明の効果】
以上説明したように、本発明によれば、アプリケーションからデータベースを参照または更新するとき、データベースに定義された物理的な構造をアプリケーションが使用する論理的な構造へ変換し、またはアプリケーションが使用する論理的な構造をデータベースに定義された物理的な構造へ変換するようにしているので、データベースの再設計が随時発生することによりテーブル構造の見直しが発生した場合、アプリケーションから独立したデータベース参照モジュールの物理定義及びデータベース更新モジュールの物理定義に対する改修に絞ることで、データベースの変更に対する極めて柔軟な対応を可能としている。また、アプリケーションはデータベースに定義している物理的なデータ構造を意識する必要がなく、アプリケーションが使用するのに適したデータ構造のみを意識すればよいことになり、データベースの物理的な構造を隠すことが可能であるという、リレーショナルデータベースの長所を活用することを可能としている。
【図面の簡単な説明】
【図1】本発明の一実施形態である携帯端末の構成を示すブロック図である。
【図2】データベースアクセスモジュールとアプリケーションの処理構成図である。
【図3】データベースアクセスモジュールとアプリケーションの処理内容を示すフローチャート図である。
【図4】データベース参照モジュールの処理内容を示すフローチャート図である。
【図5】データベース更新モジュールの処理内容を示すフローチャート図である。
【図6】物理定義、論理定義の概要構成を説明するための説明図である。
【図7】テーブル構造の見直しが発生した場合の改修手順を示すフローチャート図である。
【図8】物理定義の変更例を説明するための説明図である。
【符号の説明】
101…処理装置、102…外部記憶装置、103…ディスプレイ、104…タッチペン、105…CPU、106…内部記憶装置、107…データベース。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a database definition method and a database access processing method that are important factors in improving processing performance in a system that operates on a small portable terminal such as a mobile computer.
[0002]
[Prior art]
In system development using a database, it is indispensable to take measures against database access processing time in the process of improving the processing performance of the system. For example, in the screen display process and the screen end process, it can be said that the processing time required to access the database has a greater specific gravity than the processing time required for screen display. Therefore, reducing the access processing time to the database is the most effective means for reducing the overall processing time.
[0003]
In addition, in a database-based system, the database model used is a relational database with advanced functions such as high-speed computer processing performance, query optimization, parallel processing, and data distribution. It has become mainstream. The reason why relational databases have been widely supported is that the physical structure of the database is hidden, and if the application is only aware of the logical structure as a two-dimensional simple table, the non-procedural query language called SQL is used. The necessary data can be easily accessed.
[0004]
[Problems to be solved by the invention]
A small portable terminal used as a mobile computer or the like uses a CPU with low power consumption to reduce the size of the computer main body in order to make it easier to carry, and to enable battery operation for a longer time. As a result, higher portability and more efficient power management are realized compared to notebook computers. On the other hand, the processing performance of the low power consumption CPU is weak compared to the CPU mounted on the notebook computer. When a relational database is used in system development that operates in such an environment, the processing performance of the CPU becomes a bottleneck. Therefore, to secure the performance of access processing to the database, a table structure for suppressing the number of I / Os And database design such as reviewing the record structure to minimize the number of physical columns by integrating items.
[0005]
The application manufacturing process is generally started after the database design is completed. However, in the development of a system that runs on a mobile terminal, the database access processing performance must always be taken into account. There is a problem in that a design occurs at any time, and a large number of man-hours are required each time a review of the table structure occurs.
[0006]
In addition, if the data structure considering the performance defined in the database is different from the data structure suitable for use by the application, the application will be aware of the physical data structure defined in the database. There is a problem that the advantage of the relational database that it is possible to hide the physical structure of the database cannot be utilized.
[0007]
An object of the present invention is to provide a database that collectively manages reference of data from the database and addition, update, and deletion of data to the database without the application being aware of the physical structure defined in the database. It is to provide an access processing method.
[0008]
[Means for Solving the Problems]
To achieve the above object, the invention according to claim 1, in the database access processing method in a system logical structure different physical structures and applications defined in the database uses the logical structure The data structure defines logical items used by the application as data items, and the physical structure can arbitrarily integrate the logical items to reduce the number of items and the number of I / Os. a possible data structure, when referring or updating the database from the application, the said converted into logical structures or the application, which the physical structure defined in the database the application uses uses to the physical structure defined a logical structure in the database Characterized by comprising a step of conversion.
[0009]
The invention according to claim 2 is a database access processing method in a system in which a physical structure defined in a database and a logical structure used by an application are different, wherein the logical structure is a logical used by the application. The physical structure is a data structure in which the logical items are arbitrarily integrated and the number of items can be reduced to reduce the number of I / Os. when referring to the database, as the access information of the data to be accessed to the database, obtaining a table ID and the access key from the application, the target data from the database using the table ID and access key Steps to search for The target data, and converting from the physical structure defined in the database to the logical structure of the application uses, the steps of returning the target data with the logical structure to the application It is provided with.
[0010]
The invention according to claim 3 is a database access processing method in a system in which a physical structure defined in a database and a logical structure used by an application are different, and the logical structure is a logical used by the application. The physical structure is a data structure in which the logical items are arbitrarily integrated and the number of items can be reduced to reduce the number of I / Os. when adding data to the database, as the access information of the data to be access to said database, table ID, access key, and acquiring additional data from said application, the additional data, the application wherein from the logical structure used And converting into the physical structure defined database, characterized by comprising the step of adding the target data in the database using the table ID and the access key.
[0011]
The invention according to claim 4 is a database access processing method in a system in which a physical structure defined in a database and a logical structure used by an application are different, and the logical structure is a logical used by the application. The physical structure is a data structure in which the logical items are arbitrarily integrated and the number of items can be reduced to reduce the number of I / Os. when updating the data of the database, as the access information of the data to be access to said database, table ID, a step of acquiring the access key, and the update data from the application, the update data, the application wherein from the logical structure used And converting into the physical structure defined database, characterized by comprising the step of updating the target data of the database in the update data by using the table ID and the access key.
[0012]
Invention, the database access processing method according to any one of claims 1 4, when returning a reference data of the database to the application or the database Add / Update data from the application according to claim 5 When the data is transferred to the network, data is exchanged by exchanging pointers indicating the storage locations of the data.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0014]
FIG. 1 is a block diagram showing a configuration of a mobile terminal according to an embodiment of the present invention. As shown in FIG. 1, the portable terminal includes a processing device 101 having a CPU 105 and an internal storage device 106, an external storage device 102 having a database 107 storing business data, and a display used as a data display device. 103 and a touch pen 104 used as a data input device.
[0015]
The CPU 105 and the internal storage device 106 in the processing apparatus 101 are small and have low power consumption so that the portable terminal can be carried more easily. In addition, since the display 103 enables input by a tap operation using the touch pen 104, a keyboard is not used as an input device here. In this embodiment, such a portable terminal is taken as an example, but of course, a portable terminal having a display and a keyboard having only a general display function may be used.
[0016]
FIG. 2 is a processing configuration diagram of the database access module and the application. In the portable terminal of FIG. 1, the data structure used by each process and the state converted to a data structure suitable for each process are shown. Hereinafter, a physical structure defined in the database 107 is referred to as a physical structure 205, and a logical structure used by an application is referred to as a logical structure 206.
[0017]
In the internal storage device 106, an application 201, a data area 202, a database reference module 203, and a database update module 204 are stored or secured. The application 201 reserves a data area 202 as an area for manipulating data.
[0018]
The data structure used in each process can be roughly divided into a process group that uses the logical structure 206 and a process group that uses the physical structure 205 as shown by broken lines. That is, when the physical structure 205 is changed due to a review of the table definition for the database 107, the database 107 is limited to the physical definition of the database reference module 203 and the physical definition of the database update module 204. The processing configuration enables extremely flexible responses to changes.
[0019]
FIG. 3 is a flowchart showing the processing contents of the database access module and the application. An example of an update process in which data acquired from the database 107 is displayed on the display 103 and input data is reflected in the database 107 will be described with reference to the process configuration diagram of FIG.
[0020]
First, the application 201 activates the database reference module 203 (step 301). At this time, the pointer of the data area 202 secured by the application 201 is handed over.
[0021]
The activated database reference module 203 acquires the target data from the database 107 and stores the acquired data in the data area 202 (step 302). When the storage process is completed, the database reference module 203 is terminated and the process of the application 201 is continued.
[0022]
When displaying data on the display 103, the application 201 uses the data of the logical structure 206 stored in the data area 202 (step 303). When there is an input from the touch pen 104 on the display 103, the application 201 updates the data area 202 with the input data (step 304). Next, the database update module 204 is activated to reflect the input data to the database 107 (step 305). At this time, the pointer of the data area 202 storing the input data is handed over.
[0023]
The activated database update module 204 acquires the target data stored in the data area 202, and updates the database 107 with the acquired data (step 306). When the update process is completed, the database update module 204 is terminated and the process of the application 201 is completed.
[0024]
Next, details of processing contents of the database reference module 203 and the database update module 204 will be described with reference to the flowcharts of FIGS.
[0025]
FIG. 4 is a flowchart showing the processing contents of the database reference module 203. The database reference module 203 activated from the application 201 acquires the access information 408 as an argument from the application 201 (step 401). In the access information 408, a target table ID, an access key of the target data, an access method, and a pointer indicating the storage location of the reference data are set. Here, “reference” is set as the access method.
[0026]
Next, SQL using the table ID and access key is issued, and the target data is searched from the database 107 (step 402). Here, it is determined whether the target data exists in the database 107 (step 403). If the target data does not exist, it is determined that the process has failed, and the process jumps to step 407. If the target data exists, the target data is acquired from the database 107 as the physical structure 205 (step 404). Further, the acquired data is converted from the physical structure 205 to the logical structure 206 (step 405). Then, the acquired data converted into the logical structure 206 is stored in the data area 202 designated by the pointer (step 406).
[0027]
Finally, the processing result 409 is returned to the application 201 as a return value (step 407). In the processing result 409, identification information indicating success or failure is set.
[0028]
FIG. 5 is a flowchart showing the processing contents of the database update module 204. The database update module 204 activated from the application 201 acquires the access information 514 as an argument from the application 201 (step 501). In the access information 514, a target table ID, an access key of the target data, an access method, and a pointer indicating the storage location of the addition / update data are set. Information such as addition, update, and deletion is set in the access method. Next, the process branches depending on the determination result of the access method (step 502). The process branches to step 503 if the access method is added, to step 507 if it is updated, or to step 511 if it is deleted.
[0029]
First, processing contents when an access method is added will be described. First, it is determined whether target data exists in the database 107 (step 503). If the target data exists, it is determined that the process has failed because the keys overlap, and the process jumps to step 513. If the target data does not exist, the additional data of the logical structure 206 is acquired from the data area 202 designated by the pointer (step 504). Further, the acquired additional data is converted from the logical structure 206 to the physical structure 205 (step 505). Then, the SQL using the table ID and the access key is issued, and the additional data converted into the physical structure 205 is added to the database 107 (step 506).
[0030]
Next, processing contents when the access method is update will be described. First, it is determined whether the target data exists in the database 107 (step 507). If the target data does not exist, it is determined that the process has failed, and the process jumps to step 513. If the target data exists, update data of the logical structure 206 is acquired from the data area 202 designated by the pointer (step 508). Further, the obtained update data is converted from the logical structure 206 to the physical structure 205 (step 509). Then, the SQL using the table ID and the access key is issued, and the database 107 is updated with the update data converted into the physical structure 205 (step 510).
[0031]
Furthermore, processing contents when the access method is deletion will be described. First, it is determined whether the target data exists in the database 107 (step 511). If the target data does not exist, it is determined that the process has failed, and the process jumps to step 513. If the target data exists, an SQL using the table ID and the access key is issued, and the target data is deleted from the database 107 (step 512).
[0032]
Finally, the processing result 515 in the addition, update, and deletion processing is returned to the application 201 as a return value (step 513). In the processing result 515, identification information indicating success or failure is set.
[0033]
Next, details of the data structure conversion processing in step 405 in FIG. 4, step 505 in FIG. 5 and step 509 will be described using the explanatory diagram in FIG.
[0034]
FIG. 6 is an explanatory diagram for explaining a schematic configuration of the physical definition and the logical definition. In the database reference module 203 and the database update module 204, the structure of the table group defined in the database 107 is defined as a physical definition 603 and a logical definition 601. A definition example of each structure is shown in the source code 602 and the source code 604. When converting the data structure, the source code 602 and the source code 604 are used to perform the conversion process.
[0035]
Next, the repair procedure when the table structure is reviewed will be described with reference to the flowchart of FIG. 7 and the explanatory diagram of FIG.
[0036]
FIG. 7 is a flowchart showing a repair procedure when a review of the table structure occurs. The review of the table structure is considered to occur as a measure for improving the performance (step 701). First, the review result of the table structure is reflected in the table definition of the database 107 (step 702). Next, the physical definition 603 of the database reference module 203 and the database update module 204 is corrected (steps 703 and 704). The repair work is completed by the above procedure. Since only the part using the physical structure 205 is the target of correction, the correction work for the application 201 does not occur.
[0037]
FIG. 8 is an explanatory diagram for explaining an example of changing the physical definition. For example, it is assumed that the item X801 and the item Y802 before review are integrated into the item Z804 after review. In the database reference module 203 and the database update module 204, as shown in the source code 803 before review and the source code 804 after review, the item name and the number of digits defined in the structure are respectively corrected. The above is the correction contents for the database reference module 203 and the database update module 204. Along with the change of the physical definition, the correction work for the application 201 does not occur.
[0038]
【The invention's effect】
As described above, according to the present invention, when referring to or updating a database from an application, the physical structure defined in the database is converted into a logical structure used by the application, or the logic used by the application is changed. Since the database structure is converted to the physical structure defined in the database, if the table structure is revised due to the redesign of the database, the physical structure of the database reference module independent of the application By focusing on the modifications to the definition and the physical definition of the database update module, it is possible to respond very flexibly to changes in the database. In addition, the application does not need to be aware of the physical data structure defined in the database, only the data structure suitable for use by the application needs to be considered, and the physical structure of the database is hidden. This makes it possible to take advantage of the advantages of relational databases.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a mobile terminal according to an embodiment of the present invention.
FIG. 2 is a processing configuration diagram of a database access module and an application.
FIG. 3 is a flowchart showing processing contents of a database access module and an application.
FIG. 4 is a flowchart showing processing contents of a database reference module.
FIG. 5 is a flowchart showing processing contents of a database update module.
FIG. 6 is an explanatory diagram for explaining an outline configuration of a physical definition and a logical definition.
FIG. 7 is a flowchart showing a repair procedure when a review of the table structure occurs.
FIG. 8 is an explanatory diagram for explaining an example of changing a physical definition;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 101 ... Processing apparatus, 102 ... External storage device, 103 ... Display, 104 ... Touch pen, 105 ... CPU, 106 ... Internal storage device, 107 ... Database.

Claims (5)

データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、
前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、
前記アプリケーションから前記データベースを参照または更新するとき、前記データベースに定義された前記物理的な構造を前記アプリケーションが使用する前記論理的な構造へ変換し、または前記アプリケーションが使用する前記論理的な構造を前記データベースに定義された前記物理的な構造へ変換するステップを備えたことを特徴とするデータベースアクセス処理方法。
In the database access processing method in a system where the physical structure defined in the database and the logical structure used by the application are different,
The logical structure is a data structure in which logical items used by the application are defined as data items, and the physical structure is an I / O that arbitrarily integrates the logical items and reduces the number of items. A data structure that can reduce the number of O,
When referring or updating the database from the application, the logical structure the is converted into a logical structure, or the application uses to the physical structure defined in the database the application uses database access processing method characterized by comprising the step of converting into the physical structure defined in the database.
データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、
前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、
前記アプリケーションから前記データベースを参照するときに、前記データベースに対してアクセスするべきデータのアクセス情報として、テーブルID及びアクセスキーを前記アプリケーションから取得するステップと、
前記テーブルID及びアクセスキーを用いて前記データベースから対象データを検索するステップと、
検索された対象データを、前記データベースに定義された前記物理的な構造から前記アプリケーションが使用する前記論理的な構造へ変換するステップと、
前記論理的な構造とした対象データを前記アプリケーションへ返すステップと
を備えたことを特徴とするデータベースアクセス処理方法。
In the database access processing method in a system where the physical structure defined in the database and the logical structure used by the application are different,
The logical structure is a data structure in which logical items used by the application are defined as data items, and the physical structure is an I / O that arbitrarily integrates the logical items and reduces the number of items. A data structure that can reduce the number of O,
When referring to the database from the application, as the access information of the data to be accessed to the database, obtaining a table ID and the access key from the application,
Retrieving the object data from the database using the table ID and the access key,
The retrieved target data, and converting from the physical structure defined in the database to the logical structure of the application uses,
Database access processing method characterized by comprising the step of returning the target data with the logical structure to the application.
データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、
前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、
前記アプリケーションから前記データベースにデータを追加するときに、前記データベースに対してアクセスするべきデータのアクセス情報として、テーブルID、アクセスキー、及び追加データを前記アプリケーションから取得するステップと、
前記追加データを、前記アプリケーションが使用する前記論理的な構造から前記データベースに定義された前記物理的な構造へ変換するステップと、
前記テーブルID及びアクセスキーを用いて前記データベースに対象データを追加するステップと
を備えたことを特徴とするデータベースアクセス処理方法。
In the database access processing method in a system where the physical structure defined in the database and the logical structure used by the application are different,
The logical structure is a data structure in which logical items used by the application are defined as data items, and the physical structure is an I / O that arbitrarily integrates the logical items and reduces the number of items. A data structure that can reduce the number of O,
When adding data to the database from the application, as the access information of the data to be accessed to the database, and obtaining table ID, access key, and additional data from the application,
And converting the additional data, to the physical structure of the defined from a logical structure in the database that the application uses,
Database access processing method characterized by comprising the step of adding the target data in the database using the table ID and the access key.
データベースに定義された物理的な構造とアプリケーションが使用する論理的な構造が異なるシステムにおけるデータベースアクセス処理方法において、
前記論理的な構造は、前記アプリケーションが使用する論理的な項目をデータ項目として定義したデータ構造とし、前記物理的な構造は、前記論理的な項目を任意に統合し項目数を抑えてI/O数を抑えることができるデータ構造とし、
前記アプリケーションから前記データベースデータを更新するときに、前記データベースに対してアクセスするべきデータのアクセス情報として、テーブルID、アクセスキー、及び更新データを前記アプリケーションから取得するステップと、
前記更新データを、前記アプリケーションが使用する前記論理的な構造から前記データベースに定義された前記物理的な構造へ変換するステップと、
前記テーブルID及びアクセスキーを用いて前記更新データで前記データベースの対象データを更新するステップと
を備えたことを特徴とするデータベースアクセス処理方法。
In the database access processing method in a system where the physical structure defined in the database and the logical structure used by the application are different,
The logical structure is a data structure in which logical items used by the application are defined as data items, and the physical structure is an I / O that arbitrarily integrates the logical items and reduces the number of items. A data structure that can reduce the number of O,
When updating the data of the database from the application, as the access information of the data to be accessed to the database, and obtaining table ID, access key, and the update data from the application,
And converting the updated data, to the physical structure of the defined from a logical structure in the database that the application uses,
Database access processing method characterized by comprising the step of updating the target data of the database in the update data by using the table ID and the access key.
請求項1から4の何れか1つに記載のデータベースアクセス処理方法において、
前記データベースの参照データを前記アプリケーションに返すとき、または前記アプリケーションから追加/更新データを前記データベースに渡すとき、それらのデータの格納場所を示すポインタを授受することでデータの授受を行うことを特徴とするデータベースアクセス処理方法。
In the database access processing method according to any one of claims 1 to 4,
When returning a reference data of the database to the application, or when passing in the database Add / Update data from the application, and wherein the transmit and receive data by exchanging the pointer indicating the storage location of those data Database access processing method.
JP2000297919A 2000-09-29 2000-09-29 Database access processing method Expired - Fee Related JP3865197B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000297919A JP3865197B2 (en) 2000-09-29 2000-09-29 Database access processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000297919A JP3865197B2 (en) 2000-09-29 2000-09-29 Database access processing method

Publications (2)

Publication Number Publication Date
JP2002108669A JP2002108669A (en) 2002-04-12
JP3865197B2 true JP3865197B2 (en) 2007-01-10

Family

ID=18779957

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000297919A Expired - Fee Related JP3865197B2 (en) 2000-09-29 2000-09-29 Database access processing method

Country Status (1)

Country Link
JP (1) JP3865197B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007279960A (en) * 2006-04-05 2007-10-25 Jfe Systems Inc Electronic slip provision method and electronic slip server device
JP5542857B2 (en) * 2012-03-22 2014-07-09 株式会社東芝 Query issuing device, query issuing program, query issuing method

Also Published As

Publication number Publication date
JP2002108669A (en) 2002-04-12

Similar Documents

Publication Publication Date Title
US10831753B2 (en) Query plan generation and execution in a relational database management system with a temporal-relational database
US9672017B2 (en) Object storage and synchronization hooks for occasionally-connected devices
US6694305B2 (en) Method, system, and program for processing modifications to data in tables in a database system
US10467250B2 (en) Data model design collaboration using semantically correct collaborative objects
US7822775B2 (en) Method and system for managing complex database information
US20030037037A1 (en) Method of storing, maintaining and distributing computer intelligible electronic data
CN103425722A (en) Logless atomic data movement
US20110145210A1 (en) System and Method for Managing One or More Databases
CN101184106A (en) Associated transaction processing method of mobile database
CN102426582B (en) Data manipulation management devices and data manipulation management method
CN103425723A (en) Deleting records in a multi-level storage architecture without record locks
CN102955792A (en) Method for implementing transaction processing for real-time full-text search engine
US11157466B2 (en) Data templates associated with non-relational database systems
CN103365914A (en) Database query system and method based on search engine
WO2019184618A1 (en) Method and device for storing data, server, and storage medium
Seltzer Beyond relational databases
US8161051B2 (en) Method and apparatus for data processing with index search
CN105518669A (en) Data model change management
CN108475266A (en) For removing the matching reparation of matching document
CN114925084A (en) Distributed transaction processing method, system, device and readable storage medium
CN105074696A (en) Unified searchable storage for resource-constrained and other devices
CN109815240A (en) For managing method, apparatus, equipment and the storage medium of index
CN114547095A (en) Data rapid query method and device, electronic equipment and storage medium
US20060122963A1 (en) System and method for performing a data uniqueness check in a sorted data set
JP3865197B2 (en) Database access processing method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060905

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060928

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060928

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151013

Year of fee payment: 9

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees