I want to use Datalevin as a database for my app. The README mentions :db/id as the identifier of entities, and I see these do get an autoincremented integer value on insertion.
However, there are also multiple mentions of :db/ident in the source code, for example for implicit constants.
What are the purposes of the two keywords and what are the differences?
:db/identare called Entity Identifiers in Datomic.They are used to allow for easier "pointing" to other, well known things; like an enum. So you can have the enum values as datums, but still be able to reference them via a keyword (no need to look them up every time before using them).
E.g.