Questions tagged [datomic]

Datomic is a database of flexible, time-based facts, supporting queries and joins, with elastic scalability, and ACID transactions.

From the datomic website:

Datomic is a database of flexible, time-based facts, supporting queries and joins, with elastic scalability, and ACID transactions.

Resources:

Videos:


Related tags :

430 questions
7
votes
2 answers

Datomic - db/isComponent equivalent to enforcing a foreign key dependency?

In the Datomic Schema doco - they mention a schema attribute called db/isComponent. This appears to refer to relationships defined by :db.type/ref. The db/isComponent isn't used in the Seattle example. Is it fair to say that :db.type/ref…
hawkeye
  • 34,745
  • 30
  • 150
  • 304
7
votes
1 answer

What does all the fields for db.part/db mean?

I'm a newbie to datomic and I'm still trying to figure out how the system has been built. In particular, I don't understand what role :db.part/db plays as it seems to be needed every time a schema is installed. Could somebody shed some light on what…
zcaudate
  • 13,998
  • 7
  • 64
  • 124
6
votes
0 answers

How to run datomic repl inside sublimeREPL

Datomic has a repl binary in bin/repl, how can I use this repl from within sublime text via sublime REPL? This question is similar to this one: How to run existing Clojure programme in Sublime REPL but slightly different
arcanine
  • 1,933
  • 1
  • 15
  • 22
6
votes
3 answers

How to implement sorted to-many relationships in Datomic?

There is no out-of-the-box schema feature in Datomic for sorting child entities in a to-many relationship, yet this is a very common requirement. Googling has uncovered a few solutions so I wanted to inventory the variations of requirements and…
Steve Buikhuizen
  • 1,283
  • 3
  • 12
  • 17
6
votes
2 answers

Find entities whose ref-to-many attribute contains all elements of input

Suppose I have entity entry with ref-to-many attribute :entry/groups. How should I build a query to find entities whose :entry/groups attribute contains all of my input foreign ids? Next pseudocode will illustrate my question better: [2 3] ; having…
Twice_Twice
  • 527
  • 4
  • 16
6
votes
1 answer

What data type to use so that 1 and 1.0 are both valid in Datomic?

{ :db/id #db/id[:db.part/db] :db/ident :outcome/weighting :db/valueType :db.type/float :db/cardinality :db.cardinality/one :db.install/_attribute :db.part/db } I get an error when I try and add 1 to the entity. :message…
fatbatman
  • 73
  • 6
6
votes
2 answers

Datomic - working with OR clause

I'm currently working on migrating my clojure app(with korma) to Datomic framework and been in a loop while I was translating the queries. I realise the queries are not completely flexible(compared to korma), for example i would like to evaluate…
Coding active
  • 1,620
  • 3
  • 23
  • 40
6
votes
1 answer

Migrate to datomic from postgres

is there any way to migrate to datomic directly from postgres..? I have one existing postgres database i am planning to migrate to datomic is there any source or library from where i can get help?
piyushmandovra
  • 4,219
  • 3
  • 19
  • 30
6
votes
1 answer

Datomic queries and laziness

I'm surprised to find that query results in datomic are not lazy, when entities are. Is there an obvious rationale for this choice that I am missing? It seems reasonable that someone might want to want to (map some-fn (take 100…
Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91
6
votes
3 answers

How can Datomic users cope without composite indexes?

In Datomic, how do you efficiently perform queries such as 'find all people living in Washington older than 50' (city and age may vary)? In relational databases and most of NoSQL databases you use composite indexes for this purpose; Datomic, as far…
Tomas Kulich
  • 14,388
  • 4
  • 30
  • 35
6
votes
1 answer

How can I use Datomic Pro on Heroku?

I'd like to use Datomic Pro (Starter Edition, for now) on Heroku. But I don't want to commit my download key into Git. Instead, the right thing to do would seem to be store it in an environment variable. That means my project.clj now…
Peeja
  • 13,683
  • 11
  • 58
  • 77
6
votes
1 answer

Clojure instant/parse-timestamp usage

A clojure newbie question. I am trying to figure out the best way to pass a date from a client (written in any language) to a server written in clojure that rests on a Datomic database. To avoid any problems with language specific classes I was…
Litterate
  • 135
  • 1
  • 6
6
votes
1 answer

Multi-Tenancy with Clojure & Datomic

What (if any) are the current options for Clojure, Datomic and multi-tenancy? Is this the sort of thing that leveraging existing Java libraries would be useful for? Or would there be a more straight forward way of applying a roll-you-own solution…
duncsoz
  • 153
  • 1
  • 7
6
votes
2 answers

What's the more idiomatic option in Datomic land for this schema?

I have a question regarding what's a more idiomatic schema for Datomic. Let's say we have the entities User, Post and Topic. Post can belong to Topic, User and other Post (replies). Now, should I, a) Create a :posts attribute, that is just a list of…
Henrik
  • 362
  • 3
  • 10
6
votes
2 answers

Using a database function in a datomic query

I'm trying to do an 'outer join' in Datomic via the REST API. From https://github.com/Datomic/day-of-datomic/blob/master/tutorial/social_news.clj I have taken the final example: (defn maybe "Returns the set of attr for e, or nil if e does not…