JP2008299797A - Database system, database retrieval method in database system, and computer program used for database system - Google Patents

Database system, database retrieval method in database system, and computer program used for database system Download PDF

Info

Publication number
JP2008299797A
JP2008299797A JP2007148179A JP2007148179A JP2008299797A JP 2008299797 A JP2008299797 A JP 2008299797A JP 2007148179 A JP2007148179 A JP 2007148179A JP 2007148179 A JP2007148179 A JP 2007148179A JP 2008299797 A JP2008299797 A JP 2008299797A
Authority
JP
Japan
Prior art keywords
search
database
item
record
client device
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.)
Pending
Application number
JP2007148179A
Other languages
Japanese (ja)
Inventor
Emi Kobayashi
絵美 小林
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2007148179A priority Critical patent/JP2008299797A/en
Publication of JP2008299797A publication Critical patent/JP2008299797A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve a retrieval processing speed in a client server type database system. <P>SOLUTION: A database system is provided with; a client device 1 having a display part 4 for generating retrieval sentences including a plurality of sequenced item names; and a server device 2 having a database 8 which stores a table constituted of a plurality of records each comprising a plurality of items. The server device 2 is provided with; an item priority order storage part 9 which stores the priority order for the plurality of items in each record of the table; a retrieval item rearrangement part 10 which rearranges, on the basis of the priority order, the order of the plurality of item names included in the retrieval sentences transmitted from the client device 1; and a retrieval part 11 which retrieves, from the database 8, the records to be transmitted to the client device 1 on the basis of the retrieval sentences having the plurality of rearranged item names. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、例えばサーバクライアント型のデータベースシステムにおいて、ユーザがクライアント装置に検索条件を設定してサーバ装置のデータベースを検索する際の検索処理速度を向上させる技術に用いて好適な、データベースシステム、データベースシステムにおけるデータベース検索方法及びデータベースシステムに用いられるコンピュータプログラムに関する。   The present invention relates to a database system and a database suitable for use in a technique for improving a search processing speed when a user searches a database of a server device by setting a search condition in the client device in a server client type database system, for example. The present invention relates to a database search method in a system and a computer program used in the database system.

サーバ装置には、データベースと、このデータベースに対して問い合わせを行うソフトウェアであるデータベース管理システムとが実装されている。クライアント装置のアプリケーションがデータベース管理システムに対して検索文を発行すると、データベース管理システムは、検索文をチェックして、チェックがOKである場合、この検索文を実行し、データベースを検索して、検索結果をクライアント装置のアプリケーションに返す。データベースには、複数の項目としてのフィールドからなるレコードが複数配列されて記憶されている。   The server device is equipped with a database and a database management system that is software for inquiring the database. When the client device application issues a search statement to the database management system, the database management system checks the search statement, and if the check is OK, executes the search statement to search the database and perform a search. The result is returned to the client device application. In the database, a plurality of records including fields as a plurality of items are arranged and stored.

従来、検索条件を設定可能な汎用画面を用いて、ユーザはどのようなテーブルに対しても任意に検索条件を組み立てて、検索を行っている。この画面では、ユーザは検索条件の項目の入力を次の(1)〜(4)のような方法で行い、ユーザが入力した項目の順に条件を繋いで検索文を作成し、データベースの検索を実行している。   Conventionally, using a general-purpose screen on which search conditions can be set, a user arbitrarily assembles search conditions for any table and performs a search. On this screen, the user inputs items for the search condition by the following methods (1) to (4), creates a search sentence by connecting the conditions in the order of the items entered by the user, and searches the database. Running.

(1)ユーザは検索条件の項目を選択する。例えばSELECT(項目名1、項目名2…)FROM(テーブル名);のようにSQL文が記述されることによって、1又は複数の項目が選択される。   (1) The user selects a search condition item. For example, one or a plurality of items are selected by describing a SQL statement such as SELECT (item name 1, item name 2...) FROM (table name);

(2)ユーザはその項目に対する大小関係などの条件を設定する。SQL文に、WHERE(項目名>=3)などの条件が追加される。   (2) The user sets conditions such as a magnitude relationship for the item. A condition such as WHERE (item name> = 3) is added to the SQL statement.

(3)ユーザは別の条件を付加するかどうかを選択する。画面上での検索結果の表示順を指定する場合には、SQL文に、ORDER BY(項目名)などの条件が追加される。   (3) The user selects whether to add another condition. When designating the display order of search results on the screen, a condition such as ORDER BY (item name) is added to the SQL statement.

(4)ユーザはこれらの(1)〜(3)を繰り返す。   (4) The user repeats (1) to (3).

リレーショナルデータベースシステムでは、記憶装置に、レコードが記憶されているほかに複数のテーブル間の親子関係(あるいは参照関係)を表す情報が記憶されている。2つのテーブルの間の親子関係は、参照元のテーブルに、参照先のテーブルを識別するキーが記憶されることによって設定される。ユーザは、画面の対話ウィンドウに表示される複数のテーブルの一覧を見ることによりテーブル構成を知る。クライアント装置が、テーブル名を指定したとおりに、データベース管理システムは、検索処理を行い、より速く検索処理を終わらせるための策を講じることはない。複数のテーブルを検索する場合も同様である。   In a relational database system, a record is stored in a storage device, and information indicating a parent-child relationship (or reference relationship) between a plurality of tables is stored. The parent-child relationship between the two tables is set by storing a key for identifying the reference destination table in the reference source table. The user knows the table configuration by viewing a list of a plurality of tables displayed in the dialog window on the screen. As the client device specifies the table name, the database management system performs the search process and does not take measures to finish the search process faster. The same applies when searching a plurality of tables.

データベース管理システムは、検索要求に対して、レコードを効率的に検索するためのインデックスを用いて検索することが可能である。すなわち、データベース管理システムは、検索時におけるテーブルの組み合わせ方を知らないが、インデックスの使用などの検索の仕組みを知っている。また、データベース管理システムは、各テーブルの行数といったテーブルの特徴をも知っている。   The database management system can perform a search using an index for efficiently searching for records in response to a search request. That is, the database management system does not know how to combine tables at the time of retrieval, but knows the retrieval mechanism such as the use of an index. The database management system also knows table characteristics such as the number of rows in each table.

ところで、検索文の構成要素を組替えることによって検索処理の速度は変動する。項目名の組み方によっては、検索処理時に快適な検索性能が得られないことがある。快適な検索性能を得るための検索文をコーディングするためにはユーザには高いスキルが求められる。ユーザは、例えばOracle(登録商標)などのデータベース管理システムの検索の仕組みの特徴や、データベース管理システムが作成したデータベースのテーブルの特徴などを考慮せずに検索を行っている。そのため、検索のために無駄な時間を費やすなど、検索処理が非効率的である場合もある。   By the way, the speed of the search process varies by rearranging the constituent elements of the search sentence. Depending on how the item names are assembled, a comfortable search performance may not be obtained during the search process. In order to code a search sentence for obtaining a comfortable search performance, the user is required to have high skill. A user performs a search without considering the characteristics of a search mechanism of a database management system such as Oracle (registered trademark) or the characteristics of a database table created by the database management system. Therefore, the search process may be inefficient, such as wasting time for the search.

データベースの検索を簡単にする技術に関しては、一データ項目内のデータを意味ある単位で分類しまとめた二次索引を作成するデータベースの検索処理方式(特許文献1参照)が知られている。テーブルのリンク関係を一括して管理し、リレーショナルデータベースのテーブル構造を把握していなくてもRDBから必要な情報を容易に得られるようにするリレーショナルデータベース管理装置(特許文献2参照)や、関係型データベースの複数の表をマッチングするための条件を設定するプログラムをユーザが作成しなくても検索が可能なデータベース検索システム(特許文献3参照)も提案されている。
特開平4−273378号公報 特開平11−3257号公報 特開2000−35967号公報
As a technique for simplifying database search, a database search processing method (see Patent Document 1) that creates a secondary index in which data in one data item is classified and grouped into meaningful units is known. A relational database management device (see Patent Document 2) that manages the link relations of tables in a lump so that necessary information can be easily obtained from the RDB even if the table structure of the relational database is not grasped. There has also been proposed a database search system (see Patent Document 3) that enables a search without a user creating a program for setting conditions for matching a plurality of tables in a database.
JP-A-4-273378 Japanese Patent Laid-Open No. 11-3257 JP 2000-35967 A

しかしながら、ユーザはデータベースのテーブル構成およびテーブルの特徴を認識し、かつどのように検索文を組み立てれば効率良く検索を行えるかを考えながら検索条件を設定しなければならず、ユーザがこれらのテーブル構成やテーブルの特徴を考慮しないで項目名を画面上で組み合わせた場合には検索処理は最短の時間で終わらない。例えば画面上の複数のプルダウンメニューから選択された項目名を、クライアント装置がサーバ装置へ送信した場合、データベース管理システムがテーブル間の親子関係や各テーブルの行数に応じて、検索性能を十分発揮させた状態で検索を行うとは限らない。   However, the user must set the search conditions while recognizing the table structure of the database and the characteristics of the table, and considering how the search sentence can be assembled to efficiently perform the search. If the item names are combined on the screen without considering the characteristics of the table, the search process does not end in the shortest time. For example, when the client device sends the item name selected from the multiple pull-down menus on the screen to the server device, the database management system will display the search performance sufficiently according to the parent-child relationship between the tables and the number of rows in each table. The search is not always performed in the state in which the search is performed.

従って、快適な検索速度で検索を行うためには、ユーザは常にデータベースのテーブル構成およびテーブルの特徴を認識していなければならないため、大規模なデータベースシステムでは、最短の時間で検索を終わらせることは到底不可能である。   Therefore, in order to perform a search at a comfortable search speed, the user must always be aware of the database table configuration and table characteristics. Therefore, in a large-scale database system, the search can be completed in the shortest time. Is impossible at all.

本発明は、上記の課題に鑑み、クライアントサーバ型のデータベースシステムにおいて、検索処理の速度を向上させることを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to improve the speed of search processing in a client-server database system.

本発明の一態様によれば、順序付けされた複数の項目名を含む検索文を生成するための表示部を有するクライアント装置と、複数の項目からなるレコードが複数配列されて構成されてなるテーブルを記憶するデータベースから、この検索文の条件に合致するレコードを検索し、検索したレコードを前記クライアント装置へ送信するサーバ装置と、を備え、このサーバ装置が、前記データベースに記憶されたテーブルの各レコードが持つ複数の項目の間の優先順位を記憶する項目優先順位記憶部と、前記クライアント装置より送信された検索文に含まれる複数の項目名の順序を、この優先順位に基づいて組替える検索項目組替え処理部と、この検索項目組替え処理部において組替えられた複数の項目名を持つ検索文に基づいて前記クライアント装置に送信されるレコードを前記データベースから検索する検索部と、を備えたことを特徴とするデータベースシステムが提供される。   According to one aspect of the present invention, there is provided a client device having a display unit for generating a search sentence including a plurality of ordered item names, and a table configured by arranging a plurality of records including a plurality of items. And a server device that searches the stored database for a record that matches the condition of the search statement, and transmits the searched record to the client device. The server device stores each record in the table stored in the database. An item priority storage unit for storing priorities among a plurality of items possessed by and a search item for rearranging the order of a plurality of item names included in a search sentence transmitted from the client device based on the priority The client based on a recombination processing unit and a search statement having a plurality of item names rearranged in the search item recombination processing unit A search unit for searching a record to be sent to the location from the database, the database system characterized by comprising a are provided.

また、本発明の別の一態様によれば、順序付けされた複数の項目名を含む検索文を生成するための表示部を有するクライアント装置が、検索文を生成するステップと、複数の項目からなるレコードが複数配列されて構成されてなるテーブルを記憶するデータベースを有するサーバ装置が、このクライアント装置より送信された検索文に含まれる複数の項目名の順序を、記憶手段に記憶されたこのデータベースに記憶されたテーブルの各レコードが持つ複数の項目の間の優先順位に基づいて組替えるステップと、前記サーバ装置が、組替えた複数の項目名を持つ検索文の条件に合致するレコードを、前記データベースから検索するステップと、前記サーバ装置が、検索したレコードを前記クライアント装置へ送信するステップと、を備えたことを特徴とするデータベース検索方法が提供される。   According to another aspect of the present invention, a client device having a display unit for generating a search sentence including a plurality of ordered item names includes a step of generating a search sentence and a plurality of items. A server apparatus having a database for storing a table formed by arranging a plurality of records, records the order of a plurality of item names included in a search sentence transmitted from the client apparatus in this database stored in the storage means. Recombination based on the priority order among a plurality of items possessed by each record of the stored table, and the server device records records that match the conditions of a search statement having a plurality of item names that have been recombined. And the server device includes a step of transmitting the searched record to the client device. Database search and wherein is provided.

また、本発明の別の一態様によれば、複数の項目からなるレコードが複数配列されて構成されてなるテーブルを記憶するデータベースにアクセス可能にする手順と、このテーブルの各レコードが持つ複数の項目の間の優先順位を記憶手段に記憶する手順と、順序付けされた複数の項目名を含む検索文を受信する手順と、この検索文に含まれる複数の項目名の順序を、この優先順位に基づいて組替える手順と、組替えた複数の項目名を持つ検索文の条件に合致するレコードを、前記データベースから検索する手順と、をコンピュータに実行させるためのコンピュータプログラムが提供される。   Further, according to another aspect of the present invention, a procedure for enabling access to a database storing a table configured by arranging a plurality of records composed of a plurality of items, and a plurality of records possessed by each record of the table The procedure for storing the priority order between items in the storage means, the procedure for receiving a search sentence including a plurality of ordered item names, and the order of the plurality of item names included in the search sentence are set to this priority order. There is provided a computer program for causing a computer to execute a recombination procedure based on the above and a procedure for searching the database for a record that matches the condition of a search statement having a plurality of recombined item names.

本発明によれば、従来と同様の画面操作により、ユーザにテーブル構成およびテーブルの特徴を意識させること無く、最適な検索文の作成および最適な検索時間で検索を行うことが可能となる。また、検索文に含まれる項目の順序が検索に非効率な場合に生じる検索時間の無駄を削除することができる。   According to the present invention, it is possible to create an optimal search sentence and perform a search in an optimal search time without making the user aware of the table configuration and the table characteristics by the same screen operation as before. Further, it is possible to eliminate a waste of search time that occurs when the order of items included in a search sentence is inefficient for search.

以下、本発明の実施の形態に係るデータベースシステム、データベース検索方法及びコンピュータプログラムについて、図面を参照しながら説明する。尚、各図において同一箇所については同一の符号を付すとともに、重複した説明は省略する。   Hereinafter, a database system, a database search method, and a computer program according to embodiments of the present invention will be described with reference to the drawings. In the drawings, the same portions are denoted by the same reference numerals, and redundant description is omitted.

図1は本発明の一実施形態に係るデータベースシステムの構成図である。このデータベースシステムは、クライアントサーバ型のデータベース検索システムであって、データの検索指令を行うクライアント装置1と、データベースを管理するサーバ装置2とを備えており、これらのクライアント装置1とサーバ装置2とが、ネットワーク3によって接続されている。   FIG. 1 is a configuration diagram of a database system according to an embodiment of the present invention. This database system is a client server type database search system, and includes a client device 1 that issues a data search command and a server device 2 that manages a database. Are connected by the network 3.

クライアント装置1は、パソコンであり、順序付けされた複数の項目を含む検索文を生成するための表示部4と、この表示部4に表示されるデータを生成する表示処理部5と、ユーザによって入力された検索文に対応する検索要求を生成する入力処理部6と、この検索要求をサーバ装置2へ送信するとともにサーバ装置2からの検索結果を受信する送受信部7とを備えている。ユーザの入力操作によって、検索文には、サーバ装置2に記憶されたレコードが持つ複数のフィールドを参照するための複数の項目名が含められる。入力処理部6によって、これらの項目名は順序付けされる。表示部4には、例えばディスプレイあるいはディスプレイに表示される対話ウィンドウが用いられる。表示処理部5や送受信部7の機能はCPU(中央演算装置)、LSI、ROM及びRAMによって実現される。入力処理部6の機能はキーボードやマウス等の入力手段と、この入力手段によって入力されたデータを処理するプログラムとにより実現される。   The client device 1 is a personal computer, and includes a display unit 4 for generating a search sentence including a plurality of ordered items, a display processing unit 5 for generating data displayed on the display unit 4, and input by a user The input processing unit 6 that generates a search request corresponding to the search sentence that has been sent, and the transmission / reception unit 7 that transmits the search request to the server device 2 and receives the search result from the server device 2. By the user's input operation, a plurality of item names for referring to a plurality of fields included in a record stored in the server device 2 are included in the search sentence. The input processing unit 6 orders these item names. For the display unit 4, for example, a display or an interactive window displayed on the display is used. The functions of the display processing unit 5 and the transmission / reception unit 7 are realized by a CPU (Central Processing Unit), LSI, ROM, and RAM. The functions of the input processing unit 6 are realized by input means such as a keyboard and a mouse, and a program for processing data input by the input means.

サーバ装置2はサーバコンピュータであって、リレーショナルデータベースであるデータベース8を有する。サーバ装置2は、このデータベース8からクライアント装置1より送信された検索文の条件に合致するレコードを検索し、検索したレコードをクライアント装置1へ送信する。このサーバ装置2は、データベース8に記憶されたテーブルの各レコードが持つ複数の項目の間の優先順位を記憶する項目優先順位記憶部としてのテーブル情報記憶部9と、クライアント装置1より送信された検索文に含まれる複数の項目名の順序を、この優先順位に基づいて組替える検索項目組替え処理部としての検索文組替え処理部10と、この検索文組替え処理部10において組替えられた複数の項目名を持つ検索文に基づいてクライアント装置1に送信されるデータをデータベース8から検索する検索部としての検索処理部11と、クライアント装置1からの検索要求を受信するとともに検索結果をクライアント装置1へ送信する送受信部12とを備えている。テーブル情報記憶部9は記憶手段でもある。データベース8には大容量の記憶装置が用いられる。検索処理部11の機能はデータベース管理システムにより実現される。   The server device 2 is a server computer and has a database 8 that is a relational database. The server device 2 searches the database 8 for a record that matches the search statement condition transmitted from the client device 1, and transmits the retrieved record to the client device 1. This server device 2 is transmitted from the client device 1 and a table information storage unit 9 as an item priority storage unit for storing priorities among a plurality of items of each record of the table stored in the database 8. Retrieval recombination processing unit 10 as a search item recombination processing unit that reorders the order of a plurality of item names included in a search sentence based on the priority order, and a plurality of items rearranged in this search sentence recombination processing unit 10 A search processing unit 11 serving as a search unit that searches the database 8 for data to be transmitted to the client device 1 based on a search sentence having a name, and receives a search request from the client device 1 and sends a search result to the client device 1. A transmission / reception unit 12 for transmission. The table information storage unit 9 is also a storage unit. A large-capacity storage device is used for the database 8. The function of the search processing unit 11 is realized by a database management system.

図2はデータベース8に記憶されたテーブルの一例を示す図である。このデータベース8には、6つのレコード1〜6が配列されて構成されているテーブルAが記憶されており、これらのレコード1〜6はそれぞれ少なくとも項目1〜4を有する。つまり、データベース8は複数の項目からなるレコードが複数、例えば6個配列されて構成されてなるテーブルAを記憶している。尚、項目3は一意キーとして指定されている。また、データベース8には、テーブルAとは別のテーブルB及びCがそれぞれ例えば図3(a)及び図3(b)に示すように記憶されている。本実施形態に係るサーバ装置2では、テーブル情報記憶部9がこれらのテーブルA〜Cの項目の間の優先順位を記憶する。   FIG. 2 is a diagram illustrating an example of a table stored in the database 8. The database 8 stores a table A in which six records 1 to 6 are arranged, and these records 1 to 6 have at least items 1 to 4, respectively. In other words, the database 8 stores a table A configured by arranging a plurality of, for example, six records including a plurality of items. Item 3 is designated as a unique key. Further, the database 8 stores tables B and C different from the table A as shown in FIGS. 3A and 3B, for example. In the server device 2 according to the present embodiment, the table information storage unit 9 stores priorities among the items of the tables A to C.

図4はテーブル情報記憶部9に記憶されたテーブル情報の一例を示す図である。テーブル情報記憶部9は、テーブル情報として、テーブルA〜Cの各項目の間の優先順位を記憶している。例えばテーブルAについては、項目3、項目2、項目4、項目1の順に優先順位が書き込まれる。検索処理部11によるデータベース8に対する問い合わせの際に、項目1〜4のうちのいずれかの項目を先頭にすると最短な検索を行えるかを、このテーブル情報は示しているとも言える。同様に、テーブルBについては、項目2、項目1の順に優先順位が設定されており、また、テーブルCについては、項目1、項目3、項目5、項目4、項目2、項目6の順に優先順位が設定されている。   FIG. 4 is a diagram illustrating an example of table information stored in the table information storage unit 9. The table information storage unit 9 stores priorities among items of the tables A to C as table information. For example, for the table A, the priority order is written in the order of item 3, item 2, item 4, and item 1. It can be said that this table information indicates whether or not the search can be performed in the shortest when any one of the items 1 to 4 is placed at the top when the search processing unit 11 makes an inquiry to the database 8. Similarly, priority is set in the order of item 2 and item 1 for table B, and priority is given in the order of item 1, item 3, item 5, item 4, item 2, and item 6 for table C. The ranking is set.

本実施形態に係るサーバ装置2では、次の(1)、(2)が用いられる。   In the server device 2 according to the present embodiment, the following (1) and (2) are used.

(1)データベース8のテーブル構成及びテーブルの特徴を持っておく。 (1) Have the table structure and table characteristics of the database 8.

管理者は、データベース8のテーブル構成およびテーブルの特徴を考慮したテーブル情報を作成し、予め、該当するテーブルを検索する際の検索条件として、検索を最短で行う検索文を作成するために設定する項目の順番を記憶装置に書き込んでおく。   The administrator creates table information in consideration of the table configuration of the database 8 and the table characteristics, and is set in advance as a search condition for searching the corresponding table in order to create a search sentence that performs the search in the shortest time. The order of items is written in the storage device.

(2)検索処理の実行時に検索文の組替えを行う。 (2) The search sentence is rearranged when the search process is executed.

サーバ装置2は、検索を実行する前に、テーブル情報を参照し、ユーザが入力した検索条件の項目の順番を組替えて、最適な検索文を自動生成する。   Before executing the search, the server device 2 refers to the table information, rearranges the order of the search condition items input by the user, and automatically generates an optimal search sentence.

これにより、従来と同様の画面操作により、ユーザが常にデータベース8のテーブル構成およびテーブルの特徴を意識することなく、無駄の無い検索時間内に検索を実行できる。   As a result, the user can always execute a search within a search time without waste without being aware of the table configuration and table characteristics of the database 8 by a screen operation similar to the conventional one.

また、図5は本発明の一実施形態に係るデータベース検索方法を説明するためのフローチャートである。クライアント装置1は検索文を生成する(ステップA1)。サーバ装置2がこのクライアント装置1より送信された検索文に含まれる複数の項目名の順序を、テーブル情報記憶部9に記憶された複数の項目の間の優先順位に基づいて組替えし(ステップA2)、サーバ装置2が、組替えられた複数の項目名を持つ検索文の条件に合致するレコードを、データベース8から検索し(ステップA3)、検索したレコードをクライアント装置1へ送信する(ステップA4)。快適な検索性能をシステムが発揮可能なSQL文をコーディングするためにはユーザには高いスキルが求められるが、本発明のこの実施形態に係るデータベース検索方法によれば、サーバ装置2が検索文を自動的に組み替えるため、ユーザのスキルや、ユーザがテーブルの仕組みを知っているか又は知っていないかにかかわらず、検索処理の速度を向上させることができる。   FIG. 5 is a flowchart for explaining a database search method according to an embodiment of the present invention. The client device 1 generates a search sentence (step A1). The server apparatus 2 rearranges the order of the plurality of item names included in the search sentence transmitted from the client apparatus 1 based on the priority order among the plurality of items stored in the table information storage unit 9 (step A2 ) The server device 2 searches the database 8 for a record that matches the search statement condition having a plurality of item names that have been rearranged (step A3), and transmits the searched record to the client device 1 (step A4). . In order to code an SQL sentence that allows the system to exhibit a comfortable search performance, the user is required to have a high skill. However, according to the database search method according to this embodiment of the present invention, the server device 2 displays a search sentence. Since it is automatically rearranged, the speed of the search process can be improved regardless of the skill of the user and whether the user knows or does not know the mechanism of the table.

このような構成の本実施形態に係るデータベースシステムにおける処理フローの一例を説明する。   An example of a processing flow in the database system according to the present embodiment having such a configuration will be described.

[1]データの入力操作
クライアント装置1においては、入力処理部6が検索条件の入力操作を行う。具体的には、表示部4は複数種類のプルダウンメニューを表示する。テーブル名を選択するためのプルダウンメニューと、項目名を選択するためのプルダウンメニューと、WHERE句やORDER BY句等を追加するためのプルダウンメニューとを表示部4は表示する。ユーザはこれらのプルダウンメニューから、所望のテーブル名、項目名及び追加の条件を選択して確定させると、入力処理部6は検索文であるSQL文の組み立て処理を行う。組み立てられた検索条件のデータは、送受信部7からサーバ装置2の送受信部12に対して送信される。ここでは、入力処理部6が、検索条件として次の設定を行ったものとする。
[1] Data Input Operation In the client device 1, the input processing unit 6 performs an input operation for search conditions. Specifically, the display unit 4 displays a plurality of types of pull-down menus. The display unit 4 displays a pull-down menu for selecting a table name, a pull-down menu for selecting an item name, and a pull-down menu for adding a WHERE clause, an ORDER BY clause, and the like. When the user selects and confirms a desired table name, item name, and additional condition from these pull-down menus, the input processing unit 6 assembles an SQL sentence that is a search sentence. The assembled search condition data is transmitted from the transmission / reception unit 7 to the transmission / reception unit 12 of the server device 2. Here, it is assumed that the input processing unit 6 performs the following setting as a search condition.

検索対象テーブル:テーブルA
検索条件:項目1=“ABC”&項目3=“d”
[2]データの検索条件の組替え
サーバ装置2において、検索処理部11が検索要求を受信すると、検索処理部11は検索条件のデータを検索文組替え処理部10に入力する。
Search target table: Table A
Search condition: Item 1 = "ABC"& Item 3 = "d"
[2] Recombination of data search conditions In the server device 2, when the search processing unit 11 receives a search request, the search processing unit 11 inputs data of the search conditions to the search statement recombination processing unit 10.

図6は検索文組替え処理部10の処理内容を説明するためのフローチャートである。検索文組替え処理部10は、テーブル情報記憶部9のテーブル情報を参照して、テーブルAの検索条件の項目1〜4の間の優先順位を読み込む(ステップB1)。検索文組替え処理部10は、クライアント装置1からの検索文に含まれる項目1、3と、テーブル情報とを比較し(ステップB2)、これらの項目1、3とテーブル情報との間に差異があるかどうかを判定する(ステップB3)。ステップB3において、差異があると検索文組替え処理部10が判定した場合にはYESルートを通り、ステップB4において、検索文組替え処理部10は、検索処理部11からの検索条件と、テーブル情報記憶部9により読み込まれた優先順位とを基に、検索条件の組替えを実行し、組替えた結果データを検索処理部11に入力する。図2の例を基にした組替え例を以下に示す。項目3、項目1の順に組替えられた結果が示されている。   FIG. 6 is a flowchart for explaining the processing contents of the search statement reordering processing unit 10. The search sentence reordering processing unit 10 refers to the table information in the table information storage unit 9 and reads the priority order among the search condition items 1 to 4 of the table A (step B1). The search statement reordering processing unit 10 compares the items 1 and 3 included in the search statement from the client device 1 with the table information (step B2), and there is a difference between these items 1 and 3 and the table information. It is determined whether or not there is (step B3). In step B3, if the search text reordering processing unit 10 determines that there is a difference, the YES route is passed. In step B4, the search text reordering processing unit 10 stores the search condition from the search processing unit 11 and the table information storage. Based on the priority order read by the unit 9, the search conditions are rearranged, and the rearranged result data is input to the search processing unit 11. A rearrangement example based on the example of FIG. 2 is shown below. The result of rearrangement in the order of item 3 and item 1 is shown.

項目優先順位の読み込み:優先順位は項目3、項目2、項目4、項目1の順
検索条件の組替え結果:項目3=“d”&項目1=“ABC”
[3]データの検索結果の表示
サーバ装置2の検索処理部11は組替えられた検索文を利用して、データベース8を検索し、送受信部12は検索結果をクライアント装置1へ送信する。クライアント装置1の送受信部7はサーバ装置2からの検索結果を表示処理部5に渡す。表示処理部5は、受け取った検索結果を表示する。なお、ステップB3において、差異がないと検索文組替え処理部10が判定した場合にはNOルートを通り、項目の組替えを行ない旨を検索処理部11に通知して、検索処理部11はクライアント装置1からの検索文に基づいてデータベース8の検索を行う。
Reading item priority order: priority order is item 3, item 2, item 4, item 1 Recombination result of search condition: item 3 = "d"& item 1 = "ABC"
[3] Display of Data Search Result The search processing unit 11 of the server apparatus 2 searches the database 8 by using the rearranged search sentence, and the transmission / reception unit 12 transmits the search result to the client apparatus 1. The transmission / reception unit 7 of the client device 1 passes the search result from the server device 2 to the display processing unit 5. The display processing unit 5 displays the received search result. In step B3, if the search statement reordering processing unit 10 determines that there is no difference, the search processing unit 11 notifies the search processing unit 11 that the reorganization of the item is performed through the NO route, and the search processing unit 11 receives the client device. The database 8 is searched based on the search sentence from 1.

このように、本実施形態に係るデータベースシステム及びデータベース検索方法は、検索条件の組替えを自動的に行うことができるため、以下の(1)〜(3)のような利点がある。   As described above, the database system and the database search method according to this embodiment have the following advantages (1) to (3) because the search conditions can be automatically rearranged.

(1)優先順位の高い項目から検索条件として検索の実行時に使われることにより、検索時間の無駄が無くなる。 (1) The search time is not wasted by being used as a search condition from a high priority item when executing a search.

(2)ユーザはテーブル構成およびテーブルの特徴を意識する必要がないため、操作性が向上する。 (2) Since the user does not need to be aware of the table configuration and table characteristics, the operability is improved.

(3)検索時間の無駄がなくなるため、CPUの負荷が軽減する。 (3) Since the search time is not wasted, the load on the CPU is reduced.

以上のことより、本発明のこの実施形態に係るデータベースシステム及びデータベース検索方法によれば、無駄な検索時間を削減でき、操作性が向上することになり、ユーザフレンドリーな検索処理を行える。   As described above, according to the database system and the database search method according to this embodiment of the present invention, useless search time can be reduced, operability is improved, and user-friendly search processing can be performed.

このようにして、ユーザに設定された検索条件と同意の条件となるよう、検索条件の順序を組替えることにより、最短の検索時間で検索が実行できるようになる。   Thus, the search can be executed in the shortest search time by rearranging the order of the search conditions so that the search conditions set by the user and the conditions of the agreement are satisfied.

上記実施形態では、サーバクライアント型について説明したが、本発明はコンピュータ単体において実現することもできる。この場合には、上記のデータベース8、テーブル情報記憶部9、検索文組替え処理部10及び検索処理部11の各機能をプログラムによって実現する。このプログラムをCD−ROM、DVD−ROM、フラッシュメモリ又はフロッピー(登録商標)ディスクなどの記録媒体に記録しておき、これらの記録媒体に記録されたプログラムを汎用コンピュータにインストールすることによっても、サーバクライアント型のデータベースシステムで得られた効果と同じ効果を得ることができる。   Although the server client type has been described in the above embodiment, the present invention can also be realized by a single computer. In this case, the functions of the database 8, the table information storage unit 9, the search sentence rearrangement processing unit 10, and the search processing unit 11 are realized by a program. The server can also be recorded by recording this program on a recording medium such as a CD-ROM, DVD-ROM, flash memory or floppy (registered trademark) disk, and installing the program recorded on the recording medium in a general-purpose computer. It is possible to obtain the same effect as that obtained by the client type database system.

本発明の一実施形態に係るコンピュータプログラムは、データベース8にアクセス可能にする手順と、データベース8に記憶されたテーブルA〜Cの各レコードが持つ複数の項目の間の優先順位を記憶する手順と、順序付けされた複数の項目名を含む検索文を受信する手順と、この検索文に含まれる複数の項目名の順序を、この優先順位に基づいて組替える手順と、組替えた複数の項目名を持つ検索文の条件に合致するレコードを、データベース8から検索する手順とを有する。このプログラムをコンピュータに実行させることにより上記の実施形態で得られた効果と同様の効果を奏することもできる。   The computer program according to an embodiment of the present invention includes a procedure for making the database 8 accessible, a procedure for storing priorities among a plurality of items of each record of the tables A to C stored in the database 8, and , A procedure for receiving a search sentence including a plurality of ordered item names, a procedure for rearranging the order of a plurality of item names included in the search sentence based on the priority order, and a plurality of rearranged item names. And a procedure for searching the database 8 for a record that matches the condition of the search statement that the user has. By causing the computer to execute this program, the same effects as those obtained in the above embodiment can be obtained.

尚、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。上記の実施形態においてはクライアント装置1は1台であったが、本発明のデータベースシステムは、複数のクライアント装置1をネットワーク3を介して接続して構成されてもよい。上記の実施形態のテーブルA〜Cのレコードの内容、レコードの数及び項目の数は種々変更可能である。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In the above embodiment, there is one client device 1, but the database system of the present invention may be configured by connecting a plurality of client devices 1 via the network 3. The contents of the records, the number of records, and the number of items in the tables A to C of the above embodiment can be variously changed.

また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

本発明の一実施形態に係るデータベースシステムの構成図である。It is a block diagram of the database system which concerns on one Embodiment of this invention. データベースに記憶されたテーブルの一例を示す図である。It is a figure which shows an example of the table memorize | stored in the database. (a)及び(b)はそれぞれデータベースに記憶された他のテーブルの例を示す図である。(A) And (b) is a figure which shows the example of the other table memorize | stored in the database, respectively. テーブル情報記憶部に記憶されたテーブル情報の一例を示す図である。It is a figure which shows an example of the table information memorize | stored in the table information storage part. 本発明の一実施形態に係るデータベース検索方法を説明するためのフローチャートである。It is a flowchart for demonstrating the database search method which concerns on one Embodiment of this invention. サーバ装置の検索文組替え処理部の処理内容を説明するためのフローチャートである。It is a flowchart for demonstrating the processing content of the search sentence rearrangement process part of a server apparatus.

符号の説明Explanation of symbols

1…クライアント装置、2…サーバ装置、3…ネットワーク、4…表示部、5…表示処理部、6…入力処理部、7,12…送受信部、8…データベース、9…テーブル情報記憶部(項目優先順位記憶部、記憶手段)、10…検索文組替え処理部(検索項目組替え処理部)、11…検索処理部(検索部)。   DESCRIPTION OF SYMBOLS 1 ... Client apparatus, 2 ... Server apparatus, 3 ... Network, 4 ... Display part, 5 ... Display processing part, 6 ... Input processing part, 7, 12 ... Transmission / reception part, 8 ... Database, 9 ... Table information storage part (item) (Priority storage unit, storage means), 10... Search sentence rearrangement processing unit (search item rearrangement processing unit), 11... Search processing unit (search unit).

Claims (3)

順序付けされた複数の項目名を含む検索文を生成するための表示部を有するクライアント装置と、
複数の項目からなるレコードが複数配列されて構成されてなるテーブルを記憶するデータベースから、この検索文の条件に合致するレコードを検索し、検索したレコードを前記クライアント装置へ送信するサーバ装置と、を備え、
このサーバ装置が、
前記データベースに記憶されたテーブルの各レコードが持つ複数の項目の間の優先順位を記憶する項目優先順位記憶部と、
前記クライアント装置より送信された検索文に含まれる複数の項目名の順序を、この優先順位に基づいて組替える検索項目組替え処理部と、
この検索項目組替え処理部において組替えられた複数の項目名を持つ検索文に基づいて前記クライアント装置に送信されるレコードを前記データベースから検索する検索部と、
を備えたことを特徴とするデータベースシステム。
A client device having a display unit for generating a search sentence including a plurality of ordered item names;
A server that searches a record that matches a condition of the search statement from a database that stores a table configured by arranging a plurality of records including a plurality of items, and transmits the searched record to the client device; Prepared,
This server device
An item priority storage unit for storing priorities among a plurality of items of each record of the table stored in the database;
A search item reordering processing unit for reordering the order of a plurality of item names included in the search sentence transmitted from the client device based on the priority;
A search unit that searches the database for a record to be transmitted to the client device based on a search statement having a plurality of item names recombined in the search item recombination processing unit;
A database system characterized by comprising:
順序付けされた複数の項目名を含む検索文を生成するための表示部を有するクライアント装置が、検索文を生成するステップと、
複数の項目からなるレコードが複数配列されて構成されてなるテーブルを記憶するデータベースを有するサーバ装置が、このクライアント装置より送信された検索文に含まれる複数の項目名の順序を、記憶手段に記憶されたこのデータベースに記憶されたテーブルの各レコードが持つ複数の項目の間の優先順位に基づいて組替えるステップと、
前記サーバ装置が、組替えた複数の項目名を持つ検索文の条件に合致するレコードを、前記データベースから検索するステップと、
前記サーバ装置が、検索したレコードを前記クライアント装置へ送信するステップと、
を備えたことを特徴とするデータベース検索方法。
A client device having a display unit for generating a search sentence including a plurality of ordered item names, and generating a search sentence;
A server device having a database for storing a table configured by arranging a plurality of records composed of a plurality of items stores the order of a plurality of item names included in a search sentence transmitted from the client device in a storage unit. Reordering based on the priority among the items of each record of the table stored in this database,
The server device searches the database for a record that matches a search statement condition having a plurality of rearranged item names;
The server device transmitting the retrieved record to the client device;
A database search method characterized by comprising:
複数の項目からなるレコードが複数配列されて構成されてなるテーブルを記憶するデータベースにアクセス可能にする手順と、
このテーブルの各レコードが持つ複数の項目の間の優先順位を記憶手段に記憶する手順と、
順序付けされた複数の項目名を含む検索文を受信する手順と、
この検索文に含まれる複数の項目名の順序を、この優先順位に基づいて組替える手順と、
組替えた複数の項目名を持つ検索文の条件に合致するレコードを、前記データベースから検索する手順と、
をコンピュータに実行させるためのコンピュータプログラム。
Providing access to a database storing a table composed of a plurality of records composed of a plurality of items,
A procedure for storing the priority order among a plurality of items of each record of this table in the storage means;
A procedure for receiving a search statement including a plurality of ordered item names;
Reordering the order of multiple item names in this search sentence based on this priority;
A procedure for searching the database for a record that matches the condition of a search statement having a plurality of recombined item names;
A computer program for causing a computer to execute.
JP2007148179A 2007-06-04 2007-06-04 Database system, database retrieval method in database system, and computer program used for database system Pending JP2008299797A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007148179A JP2008299797A (en) 2007-06-04 2007-06-04 Database system, database retrieval method in database system, and computer program used for database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007148179A JP2008299797A (en) 2007-06-04 2007-06-04 Database system, database retrieval method in database system, and computer program used for database system

Publications (1)

Publication Number Publication Date
JP2008299797A true JP2008299797A (en) 2008-12-11

Family

ID=40173234

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007148179A Pending JP2008299797A (en) 2007-06-04 2007-06-04 Database system, database retrieval method in database system, and computer program used for database system

Country Status (1)

Country Link
JP (1) JP2008299797A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011004219A (en) * 2009-06-19 2011-01-06 Nikon Corp Image capturing apparatus and tracking method
WO2016132550A1 (en) * 2015-02-20 2016-08-25 富士通株式会社 Extraction program, extraction device, and extraction method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011004219A (en) * 2009-06-19 2011-01-06 Nikon Corp Image capturing apparatus and tracking method
WO2016132550A1 (en) * 2015-02-20 2016-08-25 富士通株式会社 Extraction program, extraction device, and extraction method
JPWO2016132550A1 (en) * 2015-02-20 2017-11-24 富士通株式会社 Extraction program, extraction apparatus, and extraction method
US10497067B2 (en) 2015-02-20 2019-12-03 Fujitsu Limited System for perfoming an extraction process on input data containing XBRL files using a combination of extraction criteria

Similar Documents

Publication Publication Date Title
JP4879580B2 (en) System and method for providing an automatic search menu to a user interface
JP4313323B2 (en) Searchable archive
JP5203733B2 (en) Coordinator server, data allocation method and program
JP5199317B2 (en) Database processing method, database processing system, and database server
JP2005521954A (en) Method and apparatus for querying a relational database
JPH1069423A (en) Hypermedia system and its directory data managing method
JP2004110219A (en) Data processing system and join processing method
KR20120106544A (en) Method for accessing files of a file system according to metadata and device implementing the method
JP6262505B2 (en) Distributed data virtualization system, query processing method, and query processing program
US20140067853A1 (en) Data search method, information system, and recording medium storing data search program
JP4181196B2 (en) SEARCH SYSTEM, SEARCH METHOD, AND INFORMATION MANAGEMENT DEVICE
JP6577412B2 (en) Operation management apparatus, operation management method, and operation management system
JP2008299797A (en) Database system, database retrieval method in database system, and computer program used for database system
JP2008152359A (en) System base configuration design support system and support method
JP2004287835A (en) Object table preparation method, object recommendation method, object table preparation program and object recommendation method
JP2006260074A (en) Cad data management device
CN113901055A (en) Data retrieval processing method and device and electronic equipment
JP4212615B2 (en) Structured document search system, structured document search method, search device, and document management device
JP2015045995A (en) Virtual database system management device, management method and management program
JP2009093554A (en) Search support method, search support system, application server, and search support program
JP2007179220A (en) Information liaison system
JP2006227820A (en) Program test system and program test method
JPH113354A (en) Data cube control system
JP6901533B2 (en) Computer system and business support method
JP2005056223A (en) Text data retrieval system, method therefor and its program