> For the complete documentation index, see [llms.txt](https://uci.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uci.sunbird.org/use/developer/database-schema/database-cassandra.md).

# Cassandra Xmessage Database

### 1. Introduction

At UCI, we leverage Cassandra as our database solution due to its distributed nature and remarkable data access speed. Cassandra's ability to distribute data across nodes enables seamless parallel data access, enhancing both read and write performance. we maintain a comprehensive history of bot conversations using the following schema.

### 2. Table Schema

* Table Name - XMessage

| Column Name  | Type          | Description                                                               |
| ------------ | ------------- | ------------------------------------------------------------------------- |
| id           | UUID          | Unique identifier for the record.                                         |
| userId       | Text          | User identifier associated with the message.                              |
| fromId       | Text          | Identifier for the sender of the message.                                 |
| channel      | Text          | Channel through which the message was sent.                               |
| provider     | Text          | Provider of the messaging service.                                        |
| timestamp    | LocalDateTime | Date and time when the message was timestamped.                           |
| messageState | Text          | Current state or status of the message.                                   |
| xMessage     | Text          | Content of the message.                                                   |
| app          | Text          | App is the name of bot                                                    |
| auxData      | Text          | Currently not using                                                       |
| messageId    | Text          | Unique identifier for fcm callback.                                       |
| replyId      | Text          | We can store id which provied by your provider like gupshup, netcore etc. |
| causeId      | Text          | Same as the messageId                                                     |
| sessionId    | UUID          | Random UUID                                                               |
| ownerOrgId   | Text          | Identifier for the owning organization.                                   |
| ownerId      | Text          | Identifier for the owner of the message.                                  |
| botUuid      | UUID          | Unique identifier for the associated bot.                                 |
| tags         | List < Text > | List of tags or labels associated with the message.                       |
| respMsgId    | Text          | Identifier for a response message (FCM uses).                             |
| remarks      | Text          | Additional remarks or comments about the message.                         |
| ---          |               |                                                                           |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://uci.sunbird.org/use/developer/database-schema/database-cassandra.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
