DAML supports MDM usecases?

Hi All,

I am new to DAML. I use solidity and would like understand where DAML supports Data Management.
Say for example,
An organization loads millions of Customer records to Blockchain
say 3 or more entity who represent the organization update the Customer records
Can I still fetch the latest version of customer records from Blockchain using DAML?

Thanks,

Hi @prithi and welcome to the forum.

In principle I can tell you that: yes, you can model data on the ledger so that you represent the evolution of data over time, limit the access to this data to specific parties and later have authorized parties retrieve that same data. At the same time, we have seen Daml been used in environments with millions (and more) of contracts and thousands of transactions per second, with proper design and careful execution.

If you’re interested in something more specific, can you clarify for me what you are after more exactly, please?

1 Like

Hi,

Thanks for your reply.

I am trying to understand how the above usecase (Customer data management) can be implemented in DAML.

Could you please clarify the below,

  1. Say I add 100 customer records, will this trigger 1 or 100 contracts?
  2. How can the customer records be queried?

Thanks,

The granularity at which data is persisted is usually mandated by the privacy requirements. Daml allows to make only parts of each transaction visible to any given party (what we refer to as sub-transaction privacy), but the payload of a single contract needs to have a set of stakeholders that will be able to access all of its data. If each customer record needs to be visible only to a specific entity, then you would need to model each customer record in a single contract. If your privacy requirements are more lax and a trusted party can handle these customer records, you can think about putting more records in a single contract (although putting too much data in a single contract can have performance implications, so you might want to think about it depending on your usage scenario).

  1. On-ledger
    • by contract ID: each contract has an ID which can be used to look it up
    • by contract key: each contract can be modeled to have a user-defined key that can be used to look up a specific contract
  2. Off-ledger
    • by template: you can ask for a specific set of contracts matching a template via the Ledger API and refine your query based on the returned results
    • custom queries: one common pattern is to keep an operational data store (ODS) that uses the Ledger API to update itself and that is purpose-built to serve a specific application

Hi @stefanobaghino-da

Thanks a lot for your reply. It helped me a lot. Can you pls direct me to code repository with example codes.

Thanks,