datahike

Open. Composable. Datalog.

Let the database do all the hard work so you can get back to what matters most.

DownloadContribute

GitHub

Implicit relational joins

Create relationships with data through pattern matching. Say goodbye to explicitly specifying the different locations of data and how you join them.

History tracking and time travel

Pick any point in time during the history of the database and query like you normally would. Join across multiple points in time or fetch all the changes since a point in time. It's that easy. Now you have a time machine for your database.

Adapts to different environments

Works natively in process on JVM environments and for major parts of the API on JS environments. The flexibility of Datahike also allows it to adapt to new languages and hardware ecosystems.

Show me a query, please!

Sure! Let's compare some SQL to Datalog.

SQL

SELECT a.alias, p.name, parent, grandparent, aunt_uncle, aunt_uncle_spouse
from aliases as a
join people as p on a.personID = p.id
join (select (select name from people as n where n.id = c1.childid)  as child,
	(select name from people as n where n.id = c1.parentid) as parent,
	(select name from people as n where n.id = c2.parentid) as grandparent,
	(select name from people as n where n.id = c3.childid)  as aunt_uncle,
	(select name from people as n where n.id = m.spouseid)  as aunt_uncle_spouse,
	c1.childid                                              as childid,
	c1.parentid                                             as parentid,
	c2.parentid                                             as grandparentid,
	c3.childid                                              as aunt_uncle_spouseid
from children as c1 
join children as c2 on c2.childID = c1.parentID 
join children as c3 on c3.parentID = c2.parentID and c2.childID != c3.childID 
left join marriages as m on c3.childid = m.personID) as aunt_uncle on aunt_uncle.childid = p.id
where a.alias = 'lizzy';

Datalog

(d/q '[:find (pull ?parent-sibling [:name {:spouse [:name]}])
	    :in $ ?person
	    :where [?parent :child ?person]
			   [?grandparent :child ?parent]
			   [?grandparent :child ?parent-sibling]
			   [(not= ?parent ?parent-sibling)]
	    db [:alias "lizzy"])

Compositional by design


Designed from the ground up with composability in mind, each component used to build Datahike is an independent library which can be used outside of the context of Datahike itself.

This design creates a general purpose database management system that can be integrated in custom solutions using a variety of languages and runtimes. It can be hosted locally, on cloud servers, or a mixture of both environments.

Datalog and the Future


Information systems today make use of vast amounts of data from various sources. The complexity of modeling relationships between all the data is crippling businesses and organisations. Nowadays it is nearly impossible to avoid the use of a graph database.

NoSQL and SQL database systems are often chosen due to their familiarity and simple data modeling requirements. However over time the need to model increasingly complex relationships results in ad-hoc solutions replicating graph database features which often results in fragile systems.

Datalog is an expressive and efficient query language that works exceptionally well on graph databases. It has seen a large degree of success in industry; from financial services such as banks, logistics and inventory management systems, to social networks.

It also has serious academic interest which indicates a bright future for Datalog in the ever evolving landscape of information systems.

Keeping Time


Time is unavoidable. Most value from information is derived from the ordering of facts over time. Time has been at the core of information management long before computers. Knowledge is impossible without the intertwined relationship of facts and time.

Datahike has built-in functionality to keep a history of facts over time. This immutable record provides the capabilities to query different states of the database across time, changes since a point in time, and theoretical future states of the database.

Trusted by

A collective effort


We believe Datalog holds the key to the future of information systems.

We wish to make this as widely available and accessible as possible.
Open, adaptable and composable with other systems.

Run it on your own machine or choice of cloud provider.

Access it from any programming language.

To make this a reality we are building and maintaining a suite of tools designed for distributed systems.
These tools will be well documented, free to use and compose in your own way.

Your support helps us with this vision and is a vote for Datalog.

Ways to support

Financial Contributions

You can sponsor work on Datahike through Open Collective or GitHub sponsors. Commercial support is also available to help you make the most of Datahike. Just reach out to us at lambdaforge. This is also a great way to accelerate development of features you require or to bring further improvements to the database for your specific use.

Other ways to contribute

There is a number of other ways you can support Datahike. Tell your friends, work colleagues and boss about us. You can build something cool with Datahike and share it with the world. Participate in the community, help answer questions about datalog and deployment, or join our squad sessions for further developments together with the core team.

How to Contribute