Oroboro
  1. King nerd, creator of OP builds, hacker slayer, & hatemail master.
  2. Stack Overflow for Teams – Collaborate and share knowledge with a private group. – Collaborate and share knowledge with a private group.

definition - Datalog

definition of Wikipedia

Oroboro Store, NYC, Oroboro is a womenswear boutique in the Nolita neighborhood of New York City, supporting mindful creative expression, rare & emerging designers, and sustainability. The latest tweets from @OroboroTV. The latest tweets from @OroboroTV.

Advertizing ▼

Wikipedia

Datalog is a query and rule language for deductive databases that syntactically is a subset of Prolog. Its origins date back to the beginning of logic programming, but it became prominent as a separate area around 1977 when Hervé Gallaire and Jack Minker organized a workshop on logic and databases.[1]David Maier is credited with coining the term Datalog.[2]

In recent years, Datalog has found new application in data integration, information extraction, networking, program analysis, security, and cloud computing.[3]

  • 3Systems implementing Datalog

Features, limitations and extensions

Query evaluation with Datalog is based on first order logic, and is thus sound and complete. It can be done efficiently even for large databases. Query evaluation is usually done using bottom-up strategies.

In contrast to Prolog, it

  1. disallows complex terms as arguments of predicates, e.g. p(1, 2) is admissible but not p(f1(1), 2),
  2. imposes certain stratification restrictions on the use of negation and recursion, and
  3. only allows range-restricted variables, i.e. each variable in the conclusion of a rule must also appear in a not negated clause in the premise of this rule.

A benefit of these constraints is that datalog queries on finite sets always terminate (unlike Prolog programs). Another is that statements and predicates of a program can be stated in any order (unlike Prolog). Various methods have been proposed to efficiently perform queries, e.g. the Magic Sets algorithm,[4] or tabled logic programming.[5]

Datalog engines are behind specialised database systems such as Intellidimension's database for the semantic web. Moreover, some widely used database systems include ideas and algorithms developed for Datalog. For example, the SQL:1999 standard includes recursive queries, and the Magic Sets algorithm (initially developed for the faster evaluation of Datalog queries) is implemented in IBM's DB2.

Two extensions that have been made to Datalog include an extension to allow object-oriented programming and an extension to allow disjunctions as heads of clauses. Both extensions have major impacts on the definition of Datalog's semantics and on the implementation of a corresponding Datalog interpreter.

Example

Example Datalog program:

These two lines define two facts, i.e. things that always hold. They can be intuitively understood as: the parent of mary is bill and the parent of john is mary.

These two lines describe the rules that define the ancestor relationship. A rule consists of two main parts separated by the :- symbol. The part to the left of this symbol is the head, the part to the right the body of the rule. A rule is read (and can be intuitively understood) as <head> if it is known that <body>. Uppercase letters stand for variables. Hence in the example the first rule can be read as X is the ancestor of Y if it is known that X is the parent of Y. And the second rule as X is the ancestor of Y if it is known that X is the parent of some Z and Z is the ancestor of Y. The ordering of the clauses is irrelevant in Datalog in contrast to Prolog which depends on the ordering of clauses for computing the result of the query call.

Datalog distinguishes between extensional and intensional predicate symbols. While extensional predicate symbols are only defined by facts, intensional predicate symbols are defined only by rules. In the example above ancestor is an intensional predicate symbol, and parent is extensional. Predicates may also be defined by facts and rules and therefore neither be purely extensional nor intensional, but any datalog program can be rewritten into an equivalent program without such predicate symbols with duplicate roles.

The query above asks for all that bill is ancestor of, and would return mary and john when posed against a Datalog system containing the facts and rules described above.

Systems implementing Datalog

Most implementations of Datalog stem from university projects. Here is a short list of systems that are either based on Datalog or provide a Datalog interpreter:

Free software/Open source

  • DES, an open-source implementation of Datalog to be used for teaching Datalog in courses. (GNU GPL)
  • bddbddb, an implementation of Datalog done at Stanford University. It is mainly used to query Java bytecode including points-to analysis on large Java programs. (GNU LGPL)
  • IRIS, an open-source Datalog engine implemented in Java. IRIS extends Datalog with function symbols, built-in predicates, locally stratified or un-stratified logic programs (using the well-founded semantics), unsafe rules and XML schema data types. (GNU LGPL v2.1)
  • Oroboro, an open-source RDF processing framework implemented in Java, includes a query and inference language based on Datalog. (GNU GPL v3+)
  • Inter4QL, an open-source command-line interpreter of Datalog-like 4QL query language implemented in C++ for Windows, Mac OS X and Linux. Negation is allowed in heads and bodies of rules as well as in recursion. (GNU GPL v3)
  • Cascalog, a Clojure library for querying data stored on Hadoop clusters (GNU GPL v3)
  • Clojure Datalog, a contributed Clojure library implementing aspects of Datalog. (Eclipse Public License 1.0)
  • Datalog for Racket, an implementation of Datalog for the Racket programming language. (GNU LGPL)
  • XSB, a logic programming and deductive database system for Unix and Windows. (GNU LGPL)
  • ConceptBase, a deductive and object-oriented database system based on a Datalog query evaluator. It is mainly used for conceptual modeling and metamodeling. (FreeBSD-style license)
  • Datalog, a lightweight deductive database system written in Lua. (GNU LGPL)
  • pyDatalog, a Datalog engine in python
  • The Jena Semantic Web framework includes a Datalog implementation as part of its general purpose rule engine, which also forms the implementation of OWL and RDFS support [6]

Non-free software

Oroboro Mac Os X

  • .QL, a commercial object-oriented variant of Datalog created by Semmle. (patents pending)
  • SecPAL a security policy language developed by Microsoft Research[7]
  • DLV is a commercial Datalog extension that supports disjunctive head clauses.
  • OverLog, an implementation of Datalog for overlay networks. (unknown licence)
  • LogicBlox, a commercial implementation of Datalog used for web-based retail planning and insurance applications
  • Meld, a commercial extension to Datalog for programming distributed systems
  • Intellidimension, provides several commercial implementations of datalog engine based on Semantic Web standards
  • StrixDB: a commercial RDF graph store, SPARQL compliant with Lua API and Datalog inference capabilities. Could be used as httpd (Apache HTTP Server) module or standalone. (although beta versions are under the Perl Artistic License 2.0)
  • Datomic is a distributed database designed to enable scalable, flexible and intelligent applications, running on next-generation cloud architectures.

See also

Oroboro Mac Os Download

References

  1. ^Hervé Gallaire, Jack Minker (Eds.): Logic and Data Bases, Symposium on Logic and Data Bases, Centre d'études et de recherches de Toulouse, 1977. Advances in Data Base Theory, Plenum Press, New York, 1978, ISBN 0-306-40060-X.
  2. ^Serge Abiteboul, Richard Hull, Victor Vianu: Foundations of databases. p305 [1].
  3. ^Datalog and Emerging applications
  4. ^Bancilhon, 'Magic sets and other strange ways to implement logic programs'
  5. ^Frank Pfenning and Carsten Schuermann Twelf User's Guide
  6. ^'Jena'. http://jena.sourceforge.net/inference/#rules.
  7. ^'SecPAL'. Microsoft Research. http://research.microsoft.com/projects/secpal.
  • S Ceri, G Gottlob, L Tanca, 'What you always wanted to know about Datalog (and never dared to ask)'. IEEE Transactions on Knowledge and Data Engineering 1(1), 1989, pp. 146–66.
  • Datalog
Retrieved from 'http://en.wikipedia.org/w/index.php?title=Datalog&oldid=491064229'

This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)

Google uses cookies and data to:

Mac Os Catalina

  • Deliver and maintain services, like tracking outages and protecting against spam, fraud, and abuse
  • Measure audience engagement and site statistics to understand how our services are used
If you agree, we’ll also use cookies and data to:

Mac Os Download

  • Improve the quality of our services and develop new ones
  • Deliver and measure the effectiveness of ads
  • Show personalized content, depending on your settings
  • Show personalized or generic ads, depending on your settings, on Google and across the web
For non-personalized content and ads, what you see may be influenced by things like the content you’re currently viewing and your location (ad serving is based on general location). Personalized content and ads can be based on those things and your activity like Google searches and videos you watch on YouTube. Personalized content and ads include things like more relevant results and recommendations, a customized YouTube homepage, and ads that are tailored to your interests.

Click “Customize” to review options, including controls to reject the use of cookies for personalization and information about browser-level controls to reject some or all cookies for other uses. You can also visit g.co/privacytools anytime.