{"by":"zh217","descendants":67,"id":33518320,"kids":[33521212,33519482,33519341,33521543,33520718,33519118,33518744,33526673,33529607,33518792,33528940,33518820,33520377,33522804,33518701,33521638,33522521,33523805,33520583,33525040,33522353],"score":425,"text":"Hi HN, I have been making this Cozo database since half a year ago, and now it is ready for public release.<p>My initial motivation is that I want a graph database. Lightweight and easy to use, like SQLite. Powerful and performant, like Postgres. I found none of the existing solutions good enough.<p>Deciding to roll my own, I need to choose a query language. I am familiar with Cypher but consider it not much of an improvement over CTE in SQL (Cypher is sometimes notationally more convenient, but not more expressive). I like Gremlin but would prefer something more declarative. Experimentations with Datomic and its clones convinced me that Datalog is the way to go.<p>Then I need a data model. I find the property graph model (Neo4j, etc.) over-constraining, and the triple store model (Datomic, etc.) suffering from inherent performance problems. They also lack the most important property of the relational model: being an algebra. Non-algebraic models are not very composable: you may store data as property graphs or triples, but when you do a query, you always get back relations. So I decided to have relational algebra as the data model.<p>The end result, I now present to you. Let me know what you think, good or bad, and I&#x27;ll do my best to address them. This is the first time that I use Rust in a significant project, and I love the experience!","time":1667910323,"title":"Show HN: Cozo – new Graph DB with Datalog, embedded like SQLite","type":"story","url":"https://github.com/cozodb/cozo"}