> 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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
