首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
基于嵌入式SQL的Datalog演绎规则解释器的设计   总被引:1,自引:0,他引:1  
文章提出了一个建立在传统关系数据库基础上的能支持ANSISQL与嵌入式SQL的演绎规则解释器。利用这个解释器,用户能够定义一个蕴含关系并可以像在演绎数据库中使用Datalog规则一样来提出查询。其方法是把演绎规则和查询翻译成嵌入式SQL程序,该程序在执行查询时能被调用。这个解释器可以被认为是扩充RDBMS演绎查询功能的一个前端工具。  相似文献   

2.
The semantics of static deductive databases is well understood based on the work in logic programming. In the past decade, various methods to incorporate update constructs into logic programming and deductive databases have been proposed. However, there is still no consensus about the appropriate treatment of dynamic behavior in deductive databases. In this paper, we propose a language called DatalogU, which is a minimal but powerful extension of Datalog with updates to base relations. DatalogU allows the user to program set-oriented complex database transactions with concurrent, disjunctive and sequential update operations in a simple and direct way. It has a simple and intuitive declarative semantics that naturally accounts for set-oriented updates in deductive databases.  相似文献   

3.
4.
Since extending DATALOG to a general-purpose programming language seems very difficult,many projects have embedded a DATALOG-based query laguage into a procedural host language,such as CORAL,Glue-Nail,etc.Although DATALOG can be consideed as function-free PROLOG,they are very different in many aspects.For instance,DATALOG is declarative while PROLOG isn‘t,DATALOG takes “a-set-at-a-time” mode of evaluation but PROLOG takes “a-tuple-at-a-time”one,DATALOG is only a query language whereas PROLOG is a general-purpose programming language.It is thought that integrating DATALOG with PROLOG may take their advantages.KBASEP is such a language.It uses KBASE as the query language and PROLOG as its procedural host language,where KBASE is a ne extemsion of DATALOG with negation and function.This paper introduces the integration techniques used in KBASE-P system.  相似文献   

5.
演绎对象数据库(DOOD)是演绎数据库与面向对象数据库两者优点相结合的产物。笔者设计实现了一个演绎对象数据库系统原型SD-DOOD,它是基于演绎数据库系统SD-DDBS的。然而,它使用的是演绎对象库语言DOOL,而演绎数据库语言是基于Datalog的,因此该文提出了应用一些转换规则来将DOOL程序转换为Datalog,通过规则转换,能求出DOOL程序的最小不动点(即程序值),从而使得系统的查询操作全都由SD-DDBS最终得出结果。文中详细介绍了转换规则的具体内容。  相似文献   

6.
The branching-time transformation technique has proven to be an efficient approach for implementing functional programming languages. In this paper we demonstrate that such a technique can also be defined for logic programming languages. More specifically, we first introduce Branching Datalog, a language that can be considered as the basis for branching-temporal deductive databases. We then present a transformation algorithm from Chain Datalog programs to the class of unary Branching Datalog programs with at most one IDB atom in the body of each clause. In this way, we obtain a novel implementation approach for Chain Datalog, shedding at the same time new light on the power of branching-time logic programming.  相似文献   

7.
The view update problem is considered in the context of deductive databases where the update of an intensional predicate is accomplished by modifying appropriately the underlying relations in the extensional database. Two classes of disjunctive databases are considered. The first class contains those disjunctive databases which allow only definite rules in the intensional database and disjunctive facts in the extensional database. The second class contains stratified disjunctive databases so that in addition to the first class, negation is allowed in the bodies of the rules, but the database must be stratified. Algorithms are given both for the insertion of an intensional predicate into and the deletion of an intensional predicate from the database. The algorithms use SLD resolution and the concept of minimal models of the extensional database. The algorithms are proved to be correct and best according to the criterion of causing minimal change to the database, where we give first priority to minimizing deletions.Research supported by the National Science Foundation under grant numbers IRI-8916059, IRI-8921591, IRI-9200898, and IRI-9210220.  相似文献   

8.
This paper introduces a simple and powerful extension of stratified DATALOG which permits to express various DB-complexity classes. The new language, called DATALOG¬s,c,p , extends DATALOG with stratified negation, a non-deterministic construct, calledchoice, and a weak form of constraints, calledpreference rules, that is, constraints that should be respected but, if they cannot be eventually enforced, they only invalidate the portions of the program which they are concerned with. Although DATALOG with stratified negation is not able to express all polynomial time queries,20) the introduction of the non-deterministic constructchoice permits to express, exactly, the ‘deterministic fragment’ of the class of DB-queriesP, under the non-deterministic semantics,NP, under the possible semantics, and coNP, under the certain semantics. The introduction of preference rules, further increases the expressive power of the language, and permits to express the complexity classes Σ 2 p , under the possibility semantics, and Π 2 p , under the certainty semantics.  相似文献   

9.
A ‘functional’ query is a query whose answer is always defined and unique i.e. it is either true or false in all models. It has been shown that the expressive powers of the various types of stable models, when restricted to the class of DATALOG¬ functional queries, do not in practice go beyond those of well-founded semantics, except for the least undefined stable models which, instead, capture the whole boolean hierarchyBH. In this paper we present a ‘functional’ language which, by means of a disciplined use of negation, achieves the desired level of expressiveness up toBH. Although the semantics of the new language is partial, all atoms in the source program are defined and possibly undefined atoms are introduced in a rewriting phase to increase the expressive power. We show that the language satisfies ‘desirable’ properties better than classical languages with (unstratified) negation and stable model semantics. We present an algorithm for the evaluation of functional queries and we show that exponential time resolution is required for hard problems only. Finally we present the architecture of a prototype of the language which has been developed.  相似文献   

10.
The view update problem for deductive databases has been defined as the problem of accomplishing the update of an intensional predicate by modifying appropriately the extensional database. A previous paper by Grant, Horty, Lobo, and Minker developed algorithms for the insertion and the deletion of an intensional predicate in certain important classes of stratified disjunctive deductive databases. This paper introduces a model theoretic approach which encompasses a wide class of Herbrand semantics, including the perfect model and stable model semantics, for disjunctive databases including negation. This generalizes the earlier results: now the intensional database may contain disjunctive and denial rules, and the database may be required to satisfy integrity constraints. As in the previous paper, the algorithms are proved to be correct and best according to the criterion of causing minimal change to the database, where the first priority is to minimize deletions.  相似文献   

11.
12.
The nested relational model allows relations that are not in first normal form. This paper gives an extension of Datalog rules for nested relations. In our approach, nested Datalog is a natural extension of Datalog introduced for the relational data model. A nested Datalog program has a hierarchical structure of rules and subprograms to manipulate relation values of nested relations. We introduce a new category of predicate symbols, the variable predicate symbols to refer to tuples of subrelations. The notion of soundness, safety and consistency is defined to avoid undesirable nested Datalog programs. The evaluation of nested Datalog is given in terms of the nested relational algebra. Finally, we relate the expressive power of nonrecursive nested Datalog to the power of nested relational algebra and safe nested tuple relational calculus.  相似文献   

13.
David Toman 《Constraints》1997,2(3-4):337-359
This paper proposes an efficient method for evaluation of deductive queries over constraint databases. The method is based on a combination of the top-down resolution with memoing and the closed form bottom-up evaluation. In this way the top-down evaluation is guaranteed to terminate for all queries for which the bottom-up evaluation terminates. The main advantage of the proposed method is the direct use of the information present in partially instantiated queries without the need for rewriting of the original program. The evaluation algorithm automatically propagates the necessary constraints during the computation. In addition, the top-down evaluation potentially allows the use of compilation techniques, developed for compilers of logic programming languages, which can make the query evaluation very efficient.  相似文献   

14.
相联规则模型可以用于在海量数据库中发现有价值的知识 ,各种求解相联规则的算法都需要较大的计算量 .随着时间推移 ,数据库中的数据也随之发生变化 .由于原先发现的规则已经过时 ,需要重新在数据集中挖掘规则 .本文通过向数据库中不追加数据的方法研究孕育在数据库中的相联规则变化情况 .在借鉴 FUP等算法的基础上 ,充分利用前次挖掘中获得的有关信息 ,提出用于再次挖掘的相联规则增量算法 Super FU P.该算法核心思想是更多地注重新增数据集 ,有效利用前次挖掘信息 ,仅仅对整个数据库扫描一次就能达到求解更新相联规则的目的 ,提高了相联规则增量算法的效率 .  相似文献   

15.
随着新兴技术的迅速发展,领域软件对开发效率提出了新的要求. Datalog语言作为一门具有简洁语法和良好语义的声明式编程语言,能帮助开发人员快速开发和解决问题,近年来越来越受到重视与欢迎.但解决真实场景问题时,现有的单机Datalog引擎计算规模往往受限于内存容量大小,不具有可扩展性.为解决上述问题,设计并实现基于核外计算的Datalog引擎.方法首先设计一系列计算Datalog程序所需的支持核外计算的操作算子,然后将Datalog程序转换合成带核外计算算子的C++程序,接着方法设计基于Hash的分区策略和基于搜索树剪枝的最少置换调度策略,将相应的分区文件调度执行计算并得到最终结果.基于该方法,实现原型工具DDL (disk-based Datalog engine),并选取广泛应用的真实Datalog程序,在合成数据集以及真实数据集上进行实验,实验结果体现了DDL良好性能以及高可扩展性.  相似文献   

16.
提出Datalog逻辑程序调用语义和调用谓词,说明包含程序调用谓词的可更新U-Datalog程序的操作语义及其固定点语义。提出在有限分层调用情况下U-Datalog程序的通用评价(evaluation)算法。最后对Datalog程序调用语义在数字版权语言中的应用做了说明并给出示例。  相似文献   

17.
负关联规则增量更新算法   总被引:1,自引:1,他引:0       下载免费PDF全文
讨论负关联规则的更新问题。与正关联规则增量更新不同,负关联规则不仅存在于频繁项集中,更多存在于非频繁项集中。针对该问题提出一种负关联规则增量更新算法NIUA,利用改进的Apriori算法以及集合的性质挖掘出频繁、非频繁项集和负关联规则。实验结果表明,该算法是可取的。  相似文献   

18.
ContextThe role of formal specification in requirements validation and analysis is generally considered to be limited because considerable expertise is required in developing and understanding the mathematical proofs. However, formal semantics of a language can provide a basis for step-by-step execution of requirements specification by building an easy to use simulator to assist in requirements elicitation, validation and analysis.ObjectiveThe objective of this paper is to illustrate the usefulness of a simulator that executes requirements and captures system states as rules and facts in a database. The database can then be queried to carry out analysis after all the requirements have been executed a given number of timesMethodBehavior Trees (BTs)1 are automatically translated into Datalog facts and rules through a simulator called SimTree. The translation process involves model-to-model (M2M) transformation and model-to-text (M2T) transformation which automatically generates the code for a simulator called SimTree. SimTree on execution produces Datalog code. The effectiveness of the simulator is evaluated using the specifications of a published case study – Ambulatory Infusion Pump (AIP)2.ResultsThe BT specification of the AIP was transformed into SimTree code for execution. The simulator produced a complete state-space for a predetermined number of runs in the form of Datalog facts and rules, which were then analyzed for various properties of interest like safety and liveness.ConclusionQueries of the resultant Datalog code were found to be helpful in identifying defects in the specification. However, probability values had to be manually assigned to all the events to ensure reachability to all leaf nodes of the tree and timely completion of all the runs. We identify optimization of execution paths to reduce execution time as our future work.  相似文献   

19.
对于轨道数据库在线更新这种大规模数据的短时间加载,安全计算机无法对其进行直接表决。为此,提出一种基于状态表决的安全计算机数据库更新表决算法,不直接对数据库表决,而是对数据库状态表决,解决表决数据量过大的问题,同时可对多系之间的数据库版本进行实时比对。使用马尔科夫模型分析该算法的安全性和可靠性,结果表明,该算法可确保安全计算机数据库的在线更新。  相似文献   

20.
基于协同缓存的分布式数据库更新机制研究   总被引:1,自引:0,他引:1       下载免费PDF全文
减小数据库事务中的写操作开销对于分布式数据库系统的性能而言很关键。该文提出了一种基于协同缓存技术的分布式数据库更新机制,通过在分布式数据库服务器节点物理内存之上构建全局协同缓冲池,并利用其缓存写入记录,减小了数据库事务中的磁盘访问开销,研究了基于协同缓存的分布式数据库更新机制与其在该机制下事务性能改进。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号