Graph
ComposeDB provides a graph structure for interacting with data on Ceramic. The ComposeDB content graph supports two types of nodes: accounts that are able to able to create & edit data in the graph, and documents containing mutable data of a given shape.
The nodes in the graph can be accounts or documents, while the edges in the graph represent relations between nodes. All nodes in the ComposeDB graph use a globally unique identifier, allowing direct access to any known node.
ComposeDB is is designed similar to a property graph database.
Accounts
Ceramic uses Decentralized Identifiers (DIDs) for Authentication, which get translated to CeramicAccount
objects by the ComposeDB client.
DIDs can represent any entity that is able to write data on Ceramic and therefore in ComposeDB, which can be end-users of an application, groups, applications or any kind of authenticated service.
In order to write or mutate data within ComposeDB, a DID must be authorized within the client instance.
Documents
Documents are Ceramic streams that store structured data as defined by a model.
Ceramic nodes can be configured to index specific models, storing all the documents using a model in a local database in order to provide fast access and query capabilities.
Using GraphQL, the ComposeDB client allows to query documents indexed by a Ceramic node, as well as creating new documents and updating existing ones when mutations are enabled.