Fork me on GitHub

I have a possibly noob question about the Datomic libraries, I was following the Getting Started section in the Datomic Documentation and it only mentions the Client API to interact with the database, but one thing I noticed is that its examples regarding defining a schema are a bit different from the ones I found on the internet, its definitions are missing the :db/id #db/id[:db.part/db] and :db.install/_attribute :db.part/db parts in the maps. To tell you truth I seriously have no idea why it is necessary and I couldn't find documentation to help me learn about it, the only thing I found ( is that it's related to defining a partition, but the documentation related to it uses it a bit differently:

[{:db/id "communities"
  :db/ident :communities}
 [:db/add :db.part/db :db.install/partition "communities"]]


I have been defining the schema for my attributes like this using the Client API:

{:db/ident       :user/username
 :db/valueType   :db.type/string
 :db/unique      :db.unique/value
 :db/cardinality :db.cardinality/one}


And it seems to be working, data is being stored in the database with an id. Does the Client API does that by default for me?


@zignd Last paragraph of the link you included should answer your question.


@rauh Oh, thanks for that! I ended up reading only some sections of this page! xD


@marshall We've previously discussed keeping data for multiple customers in a single DB rather than splitting into many DB's on a single transactor. Will that advice still apply for Datomic Cloud?