# Datamart

All user data captured or calculated by the mediarithmics platform ends in a special database named **datamart**. ‌

A mediarithmics datamart is more than a traditional database. This new generation database leverages a database engine specially designed to outperform in the domain of data-driven marketing applications. This database engine is the outcome of more than seven years of R\&D from mediarithmics engineering teams. Datamart is the first database engine to provide both real-time query processing and scalability on large data volumes.

![](/files/-MRKwZOTYHCjpaxXi328)

&#x20;A datamart is a multi-model database. Datamart displays information it manages in an **object** graph, where nodes can either be **persisted objects** or **objects computed on the fly**. Datamart then generates column-oriented tables specialized for analytics scenarios.

## Automatic identity resolution

The object graph nature of a datamart is particularly adapted to capture the 'user graph'  where each piece of information associated to a user is connected with the others in a local graph structure.

The mediarithmics graph structure organizes a user as a node, called a **UserPoint**. The user can be identified or anonymous. Think of the UserPoint as a pin-point that a detective would use to connect various pieces of information on the board, as shown in the following diagram.

![](/files/-MUE3pwGGsiykvbo7sio)

Automatic identity resolution is where the software "detective" merges two UserPoint representing the same person. All content and identifiers are regrouped under the older UserPoint. The newer UserPoint  is then archived.

## Schema based  <img src="/files/-MUE5P0y1TB26WBfvuGB" alt="" data-size="line">&#x20;

The structure of a datamart is defined by a customizable schema, defined in a text file and based on the GraphQL Schema Definition Language (SDL). The GraphQL schema defines what types of data are stored in your data graph. Schemas are strongly typed, which unlocks powerful developer tooling.

SDL is simple and intuitive to use, while being extremely powerful and expressive. The specification of this standard is available here: <http://spec.graphql.org/>

A tutorial explaining the syntax of the type system is available here: <https://graphql.org/learn/schema/>

![](/files/-MUE6t83dITlUNOra5-o)

## Computed objects

User data alone is not sufficient to implement powerful personalized marketing. As in interpersonal communication, experience can help us make educated guesses. Datamart supports homogeneous management collected and automatically computed data to get the necessary insight on each user. Both types of data are declared in the same GraphQL schema.&#x20;

The mediarithmics datamart allows the homogeneous management of the collected data and the computed data. They are both declared in the same GraphQL schema and from the outside nothing distinguishes them.&#x20;

From the inside, the computed data is associated with algorithms that are loaded into the platform in the form of plugins. These algorithms can have different roles:&#x20;

* Machine Learning Function to calculate predictive data
* UserTrait Function to calculate aggregates on user data

Like all the other plugins, they are freely modifiable and customizable.

## Query languages

* **GraphQL**: to allow [querying, in real time, the local graph of a single user](/querying-your-data/graphql-queries.md) (e.g. for real-time personalization scenarios)<br>
* **OTQL** (Object Tree Query Language): to [query the whole object graph in a couple of seconds](/querying-your-data/otql-queries.md), even with billions of data points. (e.g. for audience segmentation queries)<br>
* &#x20;**SQL**: to run powerful [analysis of your behavioral data](/data-streams/data-ingestion/activities-analytics.md)

![](/files/-MUE9BQfmvlqdT1wwXR2)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.mediarithmics.io/communities-and-organisations/datamart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
