Hi, i just start Daml. I am confused by Daml’s database. I don’t see any code which have the connection. And i read that can connect Daml database to other database such as postgres. Where can i read docs about it?
Daml isn’t a database itself. Take a look at this chart. Some points of interest (please look at the chart to follow along):
The Participant Node is most of what you’ll see in our Scala code in terms of actually implementing the ledger model and semantics, coordinating contract creation and exercise, checking authorization, actually interpreting Daml-LF code, &c. However, it does not have any form of storage itself. Instead,
the Persistence Infrastructure is where contracts and transaction history is stored. Postgres is an example of this.
You’ll note that the Participant Node interacts with the Persistence Infrastructure via a Daml Driver. This is the sort of thing you’ve seen that
with the caveat that there’s no “database” except for e.g. postgres.
Hi Stephen, i have a problem: how can i see Persistence Infrastructure history where contracts and transaction history is stored? And how is the history protected from editing?
Look forward from u!
Take a look at the replies by @drsk and @bernhardin this forum post for more explanation on how to think about and work with persistence infrastructure (referred to there as “ledger” or “underlying ledger”).
This is addressed properly in the post I linked, but to put it briefly, a Daml deployment has the properties of the underlying ledger (persistence infrastructure). If you want your ledger to have particular features, you have to choose a persistence infrastructure that has those features; Daml cannot transmute those features to all of its supported drivers.