# Data Structure

## Access to the database  <a href="#access-to-the-database" id="access-to-the-database"></a>

{% hint style="warning" %}
**Important:**

**The datebase access has to be given by your Syntphony CAI's deploy administrator.**
{% endhint %}

How to start MySQL 5.7:

​<https://dev.mysql.com/doc/refman/5.7/en/tutorial.html>​

{% hint style="warning" %}
**Important:**

**The database access can be concurrent with the virtual agent use. Check with the system administrator the best time to extract data.**
{% endhint %}

## Decentralized Data

Syntphony CAI's 4.0.0 data structure now features data granularization on a deeper level than our previous iterations. Our admin databases contain configurations and setup, while the environment database stores the virtual agent's configurations and usage data.

* The Admin database is responsible for:&#x20;
  * **Admin schema:** All user-related structures, bot indexing, information regarding organizations and environments, and file management.
  * **Configurations schema**: All config-server and environment data setup.
  * **Keycloak schema**: Used by keycloak, it contain it's default Structure.
  * **Honeypot Schema**: An empty mirror of the instance's schema data structure.
* The Environment database is responsible for:
  * **Environment schemas**: The full information from all content registered under that given environment.

### Finding usage data

Different kinds of reports can be created from the information available in Syntphony CAI’s database, such as information on usage, volume, evolution in accesses and customer satisfaction.

All conversation and usage data are found in your environment database. If you desire to collect data from distinct environments, you will require multiple queries.

&#x20;In order to extract data usage information from Syntphony CAI, three main tables must be understood:

* [Session](/user-guide/api-docs/appendices/environment-data-structure.md#technicallog)
* [User Interaction](/user-guide/api-docs/appendices/environment-data-structure.md#user-interaction)
* [Satisfaction](/user-guide/api-docs/appendices/environment-data-structure.md#satisfaction)

They, along with all of Syntphony CAI's environment data may be found in the [Environment Data Structure ](/user-guide/api-docs/appendices/environment-data-structure.md)page.


---

# 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://docs.conversational-ai.syntphony.com/user-guide/api-docs/appendices.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.
