Document Model
Collections
ditto syncs and queries documents through a combination of collection names and document identifiers ( id ) a collection is a grouping of documents, like tables in a relational database system but far simpler and more flexible structuring collections while it is good practice for documents within a collection to share a similar structure — for instance, all car related documents stored in the cars collection contain fields 'make' , 'model' , and 'year' — structural uniformity is not mandatory there is no limit to the number of collections you can have in your data model, so create as many collections as you need for more information, see docid\ vk4cuqumawqfv0heyatit managing collection s every document must be associated with a collection, even if only one document exists within that collection there are no explicit steps to managing collections; ditto implicitly creates collections, assigns documents, and organizes references based on the documents being stored querying collections when querying, database interactions occur with collections rather than individual documents for instance, the query on the right searches the entire cars collection once executed dql select from cars declaring types to declare types, prefix the collection name with the collection keyword followed by a type definition a type definition expresses the data types for the fields for example, here querying is against the cars collection with a field properties of data type map dql select from collection cars (properties map) for complete dql syntax, see ditto query language > docid\ i1cpg wxtotz6ebnw9z9e