Skip to content
Discussions/App Development/Where is Daml database & script result?Forum ↗

Where is Daml database & script result?

App Development5 posts269 views3 likesLast activity Sep 2021
TR
Tr_ng_D_i_Ph_mOP
Sep 2021

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?

Look forward this topic! Best wishes!!!

ST
Stephen
Sep 2021

Daml isn’t a database itself. Take a look at this chart. Some points of interest (please look at the chart to follow along):

  1. 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,
  2. the Persistence Infrastructure is where contracts and transaction history is stored. Postgres is an example of this.
  3. 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
Tr_ng_D_i_Ph_m:

connect Daml database to other database such as postgres

with the caveat that there’s no “database” except for e.g. postgres.

I recommend checking the Ecosystem Overview for more details on these components.

TR
Tr_ng_D_i_Ph_m
Sep 2021

Thank u so much! U make me clear!

TR
Tr_ng_D_i_Ph_m
Sep 2021

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!

Sincerely,

ST
Stephen
Sep 2021

Take a look at the replies by @drsk and @bernhard in this forum post for more explanation on how to think about and work with persistence infrastructure (referred to there as “ledger” or “underlying ledger”).

Tr_ng_D_i_Ph_m:

And how is the history protected from editing?

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.

← Back to Discussions