Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Where the daml data is stored in db or anything... still confusing to CRUD data in damlForum ↗

Where the daml data is stored in db or anything... still confusing to CRUD data in daml

App Development2 posts176 views2 likesLast activity Feb 2022
KA
Karthi_PalaniOP
Feb 2022

I dont know how to store and get back the data. is there any db in daml ?

ST
stefanobaghino-da
Feb 2022

Daml is a language that is designed around a distributed ledger. In a sense, the only useful thing you can do with it is precisely persisting data on a database. Rather than using the approach of explicitly interacting with the ledger, though, in Daml all your interactions with contracts are persistent. When you create a contract, the contract is already persisted. When you exercise a choice, the execution of that is tracked on the ledger and new contracts originating from that choice are a well. You can then read data either by interacting with active contracts from within Daml or by using the Ledger API to have an external application read data from the ledger, be it contracts or transactions.

The idea of creating, updating and deleting records can be implemented in practical terms, but your approach will go less directly towards that direction. In Daml, you usually design contracts that interact with each other and form a workflow. The set of active contracts result from that workflow can be interacted with, either from within the language or via the Ledger API.

If you haven’t already, going through our introduction to Daml in the documentation is probably the best way to get started modeling your workflows.

← Back to Discussions