Open In App

Deductive Database Semantics and Query Evaluation

Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisites: What is a Database?

We classify the relation in Datalog Program or deductive database as either output relation or input relation. output relations are defined by rules and input relations have a set of tuples explicitly listed (e.g. assembly) given the instance of the input relation we must compute instances for the output relations.

The major advantage of a deductive database is the ability to write queries. we can understand deductive databases more easily using the following diagram.

deductive database

The meaning Datalog programming usually defines deductive database in two different ways both of which essentially describe the relation instance for output relation. technically a query is a section over one of the output relations. however, the meaning of the query is clear once we understand how relation instances are associated with output relation in Datalog Program
 

Safe Datalog Programmer

There are many approaches to defining the semantics of the Datalog Program:

Least model semantics

  • This model gives users a way to understand the Program without thinking about how that Program will be executed.
  • This semantics is declarative works like relational calculus and not practical like relational algebra semantics.
  • It is comparatively simpler due to recursive rules making it difficult to understand the Program in terms of evaluation strategy.

Least fix point semantics

  • least fix point semantics will give a conceptual evaluation strategy to compute the relation.
  • It works as the basis for recursive query evaluation.
  • The efficient query evaluation strategy is used in actually for better implementation.
  • The correctness of the model is demonstrated by equivalence to the least fixed point approach.
Architecture of a transformation-based deductive DBS

 

Altogether, the main objective of this thesis is to improve existing transformation-based methods and to develop new ones for evaluating ratifiable as well as unsatisfiable recursion. The results ought to provide a realistic framework of
efficient evaluation techniques for extending existing relational database systems.
 

Query Evaluation for Deductive Database

The query evaluation for the deductive database is as follows:

phase 1: storage and access

  • The deductive database stores rules and facts on datalog formulas in clausal form
  • It contains quantifiers like existential and universals
  • Clausal forms of the formula are made up of a number of clauses each clause is composed of a number of literals connected by OR logical connection or AND logical connection

phase2: interpretation of rules

  • The deductive database then interprets all rules using various methods.
  • Interpretation of rules the fact is considered as axioms. Rules are also called deductive axioms and are used to construct a proof that derives new facts from existing facts.
  • Another method of interpretation we have given is an infinite domain of constant values with an assigned predicate for each combination of values for an argument.

Deductive Database Prototype

There are many deductive prototypes are available many such systems are memory based. it assumes all required permanent relations are stored in the main memory and during the computation process, temporary relations generated can be stored in memory.

for example RDL/c and megalog


Last Updated : 14 Feb, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads