JPS62295135A - How to search the database - Google Patents
How to search the databaseInfo
- Publication number
- JPS62295135A JPS62295135A JP61138069A JP13806986A JPS62295135A JP S62295135 A JPS62295135 A JP S62295135A JP 61138069 A JP61138069 A JP 61138069A JP 13806986 A JP13806986 A JP 13806986A JP S62295135 A JPS62295135 A JP S62295135A
- Authority
- JP
- Japan
- Prior art keywords
- database
- search
- search request
- language
- 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.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
3、発明の詳細な説明
〔産業上の利用分野〕
本発明は論理型言語によるリレーショナルデータベース
などの操作に係わり、特に、利用者がデータベースの構
造を熟知していなくても利用可能なデータベースインタ
フェースの方法に関する。[Detailed Description of the Invention] 3. Detailed Description of the Invention [Field of Industrial Application] The present invention relates to the operation of a relational database using a logical language, and is particularly applicable to operations where the user is not familiar with the structure of the database. There are also database interface methods available.
発明に最も近い公知例
リレーショナルデータベース(以下ではRD )1と略
記する)のデータベース操作は文献シー・ジエー・デー
ト著、アン・イントロダクション・トウウ・データベー
ス・システムズ(C,,1,Date : AnTnt
、roductjon to DatabaSe
SyStemS、 Vo D、、1 。The known example closest to the invention: Database operations for relational databases (hereinafter abbreviated as RD1) are described in the literature C.G. Date, An Introduction to Database Systems (C, 1, Date: AnTnt).
, product to DatabaSe
SyStemS, Vo D,,1.
3rd edition、 ADr)ISON ns[
、IEY、 1982 、 pp。3rd edition, ADr) ISON ns[
, IEY, 1982, pp.
145−158)に記載のように、ホスト・プログラム
言語によるユーザ・アプリケーション・プロゲラl〜中
にデータベース操作言語によるデータベース操作コマン
ドを埋め込むか、データベース操作コマンドを動的に生
成することによって実行するのが従来からの方法であっ
た。145-158), database operation commands written in a database operation language are embedded in a user application programmer written in a host programming language, or database operation commands are dynamically generated. This was the conventional method.
この方法によれば、データベース操作言語(例えば、S
QL言語〔1〕)の持つ性質から、利用者は検索するテ
ーブルの名称と条件付けあるいは出力したいカラムの名
称を知っていれば、不要のカラ!−の名称やテーブルの
カラ11数やカラムの並び方などを知らなくても、デー
タベース操作コマンドを作成することができるという利
点があった。According to this method, a database manipulation language (e.g. S
Due to the nature of the QL language [1]), as long as the user knows the name of the table to be searched, the conditions, or the name of the column to be output, there is no need to use any unnecessary columns! This has the advantage that database operation commands can be created without knowing the name of -, the number of columns in a table, the arrangement of columns, etc.
しかし、通常のホスト・プログラム言語(手続き型言語
)とは異質なデータベース操作言語をマスタしなければ
ならないこと、そして、言語間の変数の受は渡しとエリ
アの確保やデータベースから返されるエラーコードへの
対応など、アプリケーション・プログラムを作成・デパ
ックする利用者の負担が大きいという点については配慮
されていなかった。However, it is necessary to master a database operation language that is different from normal host programming languages (procedural languages), and passing variables between languages requires passing, securing areas, and error codes returned from the database. No consideration was given to the fact that the burden placed on users to create and unpack application programs, such as support for
本発明の目的は、RDBの操作と高度の親和性を有する
論理型言語の枠組の中で、データベースの構造に不案内
な利用者が容易に使用できるデータベース検索インタフ
ェースを提供し、アプリケーション・プロゲラl\を作
成・デバッグする利用者の負担を軽減することにある。An object of the present invention is to provide a database search interface that can be easily used by users who are unfamiliar with database structures within the framework of a logical language that has a high degree of affinity with RDB operations. The purpose is to reduce the burden on users who create and debug \.
論理型言語では、「ツクラチスは人間である」という文
を、例えば、人間(ツクラチス)という述語で表す。こ
こで、「人間」は述語名であり。In a logical language, for example, the sentence ``Tsukuratis is a human being'' is expressed by the predicate ``human being'' (Tsukuratis). Here, ``human'' is a predicate name.
「ツクラチス」は項(以下では引数と呼ぶ)である。"Tsukuratis" is a term (hereinafter referred to as an argument).
論理型言語においては、RDBのテーブルを、テーブル
名を述語名とし、カラ11数を引数の個数とする述語の
集合とみなすことにより、テーブルのロー(行)の検索
・追加・削除を事実文の検索・追加・削除と同様に扱う
ことができるので、データベース操作を言語の枠組の中
に自然な形で取り込むことができる。In a logical language, by considering an RDB table as a set of predicates with the table name as the predicate name and the number of arguments as the number 11, searching, adding, and deleting rows of the table can be done using factual statements. Since it can be handled in the same way as searching, adding, and deleting databases, database operations can be naturally incorporated into the framework of the language.
しかし、論理型言語処理系の述語呼び出しでは、呼び出
し元の述語名と引数の個数により、呼び出される述語が
決定され、引数はその順序に従って対応付けられ統一化
が行われるため、テーブルを述語呼び出しを介して利用
するときには、テーブルと対応付けられた述語の、引数
の個数とカラ11と引数のならびの対応を知っていなけ
ればならないという問題がある。However, in a predicate call in a logical language processing system, the predicate to be called is determined by the caller's predicate name and the number of arguments, and the arguments are matched and unified according to that order. When using the predicate via the table, there is a problem in that it is necessary to know the number of arguments and the correspondence between the column 11 and the arrangement of the arguments in the predicate associated with the table.
本発明は、テーブルと対応付けられた述語の述語名、引
数の個数およびカラムと引数のならびの対応をスキーマ
データとしてiMし、そのスキーマデータを用いて、論
理型言語により利用者の不完全な検索要求を完全な検索
要求に変換することにより、上記の問題を解決し、デー
タベース操作を論理型言語によって容易に記述できるイ
ンタフェースを実現する。The present invention imizes the predicate name of a predicate associated with a table, the number of arguments, and the correspondence between columns and arguments as schema data, and uses the schema data to solve the user's incomplete problem using a logical type language. By converting a search request into a complete search request, the above problem is solved and an interface that allows database operations to be easily described using a logical language is realized.
以下、本発明の実施例を第1図〜第5図により説明する
。Embodiments of the present invention will be described below with reference to FIGS. 1 to 5.
第1図は、本発明のデータベースの検索方法を適用した
計算機システムの構成図である。第1rI2!lの10
1はRr)B、102はデータベースのテーブルに対応
する述語の検索・追加・削除をテーブル操作言語による
テーブルのローの検索・追加・削除に変換して実行する
機能を有する論理型言語処理系である。】0;3は、論
理型言語のプログラムであり、ユーザ・アプリケーショ
ン・プロゲラ!、 1.04と、スキーマデータ105
および検索要求の変換a構106を含む。FIG. 1 is a configuration diagram of a computer system to which the database search method of the present invention is applied. 1st rI2! 10 of l
1 is Rr)B, 102 is a logical language processing system that has a function of converting the search, addition, and deletion of predicates corresponding to a database table into search, addition, and deletion of table rows using a table manipulation language. be. ]0;3 is a logic language program, and is a user application program. , 1.04 and schema data 105
and a search request conversion structure 106.
第2図201は、第1図101のRD B内のテーブル
の例として「人」テーブルを表した図である。各ロー2
02はalという名の人の父はbl、母はclであると
いうような情報を表している。FIG. 2 201 is a diagram showing a "person" table as an example of a table in the RD B of FIG. 1. Each row 2
02 represents information such as that the father of a person named al is bl and the mother is cl.
第3図は、102の論理型言語処理系が受は付ける検索
要求(テーブル検索述語呼び出し)301と、本発明に
よる検索要求302.スキーマデータを蓄積した述語3
03、および、302の検索要求をスキーマデータを利
用して301の検索要求に変換する述語304を表した
図である。301の検察要求は、引数の数と順序がテー
ブルのカラ!、数と順序に完全に一致しているので、完
全検索要求と呼ぶ。また、302の検索要求を不完全検
索要求と呼ぶことにする。FIG. 3 shows a search request (table search predicate call) 301 accepted by the logical language processing system 102, and a search request 302 according to the present invention. Predicate 3 that accumulates schema data
3 is a diagram showing a predicate 304 that converts the search requests 03 and 302 into the search request 301 using schema data. The number and order of arguments in the 301 prosecutor's request is just like the table! , is called a complete search request because it completely matches the number and order. Furthermore, the search request 302 will be referred to as an incomplete search request.
スキーマデータ303はテーブル名称331と、そのテ
ーブルを検索する実行可能な述語332、および、その
テーブルのカラム名称とテーブル検索述語332の引数
との対応を示す情報(カラム・引数対応情報)333を
蓄積する。The schema data 303 stores a table name 331, an executable predicate 332 for searching the table, and information (column/argument correspondence information) 333 indicating the correspondence between the column name of the table and the argument of the table search predicate 332. do.
次に、検索要求の変換機構106の動作を説明する。検
索要求の例として、ralという名の人の父は誰が?」
という問い合わせを考える。この検索要求を表現したも
のが301の完全検索要求である。301の表現を利用
者が作成するには、人というテーブルが2つのカラ11
を持ち、第1カラムが名、第2カラムが父を表すという
情報を知っていなければならない。本発明によれば、同
じ検索要求を302のように表現すればよい。302の
表現を利用者が作成するには、上記の情報を知っている
必要はなく、人というテーブルに名と父というカラムが
存在することだけを知っていればよい。Next, the operation of the search request conversion mechanism 106 will be explained. An example of a search request is: Who is the father of a person named ral? ”
Consider the following inquiry. A complete search request 301 expresses this search request. In order for the user to create the expression 301, the table ``Person'' must be created using two colors 11
, and must know that the first column represents the first name and the second column represents the father. According to the present invention, the same search request may be expressed as shown in 302. In order to create the expression 302, the user does not need to know the above information, but only needs to know that the columns ``First Name'' and ``Father'' exist in the ``Person'' table.
第4図は、変換i構106の動作を説明するためのフロ
ーチャートである。検索要求302の発行により、検索
要求の変換機構106が起動され(ステップ401)、
検索要求変換述語304が呼び出される。検索要求変換
述語304は、呼び出されると、受は渡された引数を、
検索するテーブルの名称341と、検索の条件あるいは
出力となるカラムを指定したりスト342とに分解する
(ステップ402)。カラ11のリストは第5図342
のように、カラ11の名5011等号502および値(
変数名あるいは定数値)5o3からなる。次に、341
のテーブルの名称をキーとしてスキーマデータ303を
検索し、テーブル検索述語332とカラ11・引数対応
情報333を得る(ステップ403)。カラム・引数対
応情報は第5図333のように、カラ11の名511、
等号512および値(変数名あるいは定数値)513か
らなる。次に、カラムのりスト342とカラ11・引数
対応情報333を用い、共通のカラムに対応する変数の
統一化を行う(ステップ404)。FIG. 4 is a flowchart for explaining the operation of the conversion i structure 106. Upon issuance of the search request 302, the search request conversion mechanism 106 is activated (step 401).
Search request transformation predicate 304 is called. When the search request conversion predicate 304 is called, it converts the passed argument into
The name 341 of the table to be searched and the search condition or column to be output are specified or broken down into a list 342 (step 402). The list of color 11 is shown in Figure 5 342
As in, the name of Kara 11 5011 equal sign 502 and value (
Variable name or constant value) Consists of 5o3. Next, 341
The schema data 303 is searched using the name of the table as a key, and the table search predicate 332 and the color 11/argument correspondence information 333 are obtained (step 403). The column/argument correspondence information is as shown in Figure 5 333, the name 511 of Kara 11,
It consists of an equal sign 512 and a value (variable name or constant value) 513. Next, variables corresponding to common columns are unified using the column list 342 and the color 11/argument correspondence information 333 (step 404).
この統一化とは、第5図のカラムのりスト342から一
要素500を取り出し、カラ11の名501が第5図3
33のカラム・引数対応情報のカラムの名511と等し
い要素510を選びその値513を値503と装置(例
えばP=X、al+Yと置く)する処理である。そして
次に、テーブル検索述語332を実行することにより、
カラムのりスト342の変数に要求したカラムの値がセ
ットされる(ステップ405)。This unification means that one element 500 is taken out from the column list 342 in FIG. 5, and the name 501 of column 11 is
This is a process of selecting an element 510 that is equal to the column name 511 of the column/argument correspondence information of No. 33 and assigning its value 513 to the value 503 (for example, setting P=X, al+Y). Then, by executing the table search predicate 332,
The requested column value is set in the variable of the column list 342 (step 405).
本実施例によれば、論理型言語処理系に手を加えずに、
データベースの構造を熟知していない利用者に対し、デ
ータベース操作を論理型言語によって容易に記述するこ
とができるインタフェースを提供することができる。According to this embodiment, without modifying the logical language processing system,
It is possible to provide an interface that allows users who are not familiar with database structures to easily describe database operations using a logical language.
本発明によれば、データベース操作をプロゲラ11に組
み込むことが容易な論理型言語の枠組の中で、利用者が
データベースのテーブルの構造について不完全な情報し
か持っていない場合でもデータベースを利用することが
できるインタフェースを構成することができる。このよ
うなインタフェースを提供することによって、利用者は
、テーブルに関して自らが興味のあるカラ11の名だけ
を知つていれば、データベースを利用でき、また、単一
の言語でユーザ・アプリケーション・プログラムを記述
することができるので、プログラム作成・デバッグの際
の利用者の負担が軽減されるという効果がある。According to the present invention, within the framework of a logical language that makes it easy to incorporate database operations into Progera 11, it is possible to use a database even when the user has only incomplete information about the structure of the database tables. You can configure an interface that allows By providing such an interface, users can use the database by knowing only the names of the tables they are interested in, and can also write user application programs in a single language. This has the effect of reducing the user's burden when creating and debugging programs.
第1図は、本発明を適用した計算機システ11の構成図
、第2図は、本発明におけるリレーショナル・データベ
ース内のテーブルの概念図、第3図は、本発明のデータ
ベースの検索方法を実現する手段とその動作を説明する
ための説明図、第4図は、本発明を適用したシステムの
動作を説明するためのフローチャート、第5図は本発明
のスキーマデータの使用方法を説明するための説明図で
ある。
10]・・・リレーショナル・データベース、102・
・・論理型言語処理系、105・・・スキーマデータ、
106・・・検索要求の変換機構、303・・・スキー
マデータ、3;3】・・・テーブル名称、332・・・
テーブル検索述語、ご333・・・カラl、・引数対応
情報、500・・・カラ11のリストの記憶エリア、5
10・・・カラム・引数対応情報の記憶エリア。FIG. 1 is a configuration diagram of a computer system 11 to which the present invention is applied, FIG. 2 is a conceptual diagram of tables in a relational database according to the present invention, and FIG. 3 is a diagram for realizing a database search method according to the present invention. FIG. 4 is a flowchart for explaining the operation of the system to which the present invention is applied; FIG. 5 is an explanatory diagram for explaining the method of using schema data of the present invention. It is a diagram. 10]...Relational database, 102.
... Logical language processing system, 105... Schema data,
106... Search request conversion mechanism, 303... Schema data, 3; 3]... Table name, 332...
Table search predicate, 333... Kara l, - Argument correspondence information, 500... Storage area for list of Kara 11, 5
10... Storage area for column/argument correspondence information.
Claims (1)
論理型言語処理系とからなる計算機システムにおいて、
該データベース内のテーブルの名称とそのテーブルの持
つカラムの数と名称および順序に関するデータ(スキー
マデータ)を蓄積するステップと、該スキーマデータを
用い、利用者の論理型言語による不完全な検索要求をデ
ータベース操作言語による完全な検索要求に変換するス
テップを有することを特徴とするデータベースの検索方
法。 2、上記のスキーマデータと、利用者の論理型言語によ
る不完全なデータベース検索要求論理型言語で記述した
論理型言語処理系への完全なデータベース検索要求に変
換するステップを有することを特徴とする前記第1項の
データベースの検索方法。[Claims] 1. A computer system comprising a database and a logical language processing system having a search function for the database,
A step of accumulating data (schema data) regarding the names of tables in the database and the number, names, and order of columns of the tables, and using the schema data to respond to incomplete search requests by the user's logical language. A method for searching a database, comprising the step of converting into a complete search request in a database operation language. 2. It is characterized by comprising the step of converting the above schema data and the user's incomplete database search request in the logical language into a complete database search request to the logical language processing system written in the logical language. The method of searching a database according to the above item 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61138069A JPS62295135A (en) | 1986-06-16 | 1986-06-16 | How to search the database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61138069A JPS62295135A (en) | 1986-06-16 | 1986-06-16 | How to search the database |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS62295135A true JPS62295135A (en) | 1987-12-22 |
Family
ID=15213243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61138069A Pending JPS62295135A (en) | 1986-06-16 | 1986-06-16 | How to search the database |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS62295135A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09245048A (en) * | 1996-03-04 | 1997-09-19 | Nri & Ncc Co Ltd | Argument retrieval RDB system |
JPH09251469A (en) * | 1996-03-18 | 1997-09-22 | Nri & Ncc Co Ltd | Semi-custom database system |
-
1986
- 1986-06-16 JP JP61138069A patent/JPS62295135A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09245048A (en) * | 1996-03-04 | 1997-09-19 | Nri & Ncc Co Ltd | Argument retrieval RDB system |
JPH09251469A (en) * | 1996-03-18 | 1997-09-22 | Nri & Ncc Co Ltd | Semi-custom database system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Stonebraker et al. | The design and implementation of INGRES | |
US7493335B2 (en) | Object process graph relational database interface | |
KR100843651B1 (en) | Rule application management in an abstract database | |
US6928431B2 (en) | Dynamic end user specific customization of an application's physical data layer through a data repository abstraction layer | |
US5640555A (en) | Performance optimization in a heterogeneous, distributed database environment | |
KR100659889B1 (en) | Data access methods, record carriers and computers | |
US5734887A (en) | Method and apparatus for logical data access to a physical relational database | |
JP3437849B2 (en) | Database management system and method for supporting object-oriented programming | |
US6556986B2 (en) | Database management method of invoking a function retrieving index type definition, cataloging particular index which has not yet been supported by a database system | |
US5960426A (en) | Database system and method for supporting current of cursor updates and deletes from a select query from one or more updatable tables in single node and mpp environments | |
US4979109A (en) | Method of controlling a data dictionary directory system in a data base system | |
US20090064093A1 (en) | System for Navigating Beans Using Filters and Container Managed Relationships | |
US20010018684A1 (en) | System and method for accessing non-relational data by relational access methods | |
US7765226B2 (en) | Method of generating database transaction statements based on existing queries | |
JPH04172542A (en) | Function extension system for data base management system | |
Buneman | The providence of provenance | |
US6389425B1 (en) | Embedded storage mechanism for structured data types | |
JPH06282576A (en) | Relational access system for network type data base | |
JPS62295135A (en) | How to search the database | |
Stonebraker et al. | The implementation of POSTGRES | |
JP2798118B2 (en) | Database query statement creation device | |
Amer-Yahia | From relations to objects: The RelOO prototype | |
JPS63269224A (en) | Data base access system | |
EP1128281A2 (en) | System and method for accessing non-relational data by relational access methods | |
JPH11259294A (en) | Computer system, access control method and storage medium |