> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/complaints-management/design/architecture/data-model.md).

# Data Model

Explore the **data model architecture** for the Complaints Management module to understand the foundation for how complaint information is stored, tracked, and processed within the system. It defines the relationships between various entities (citizen, complaint, service, status, actions, etc.) required to handle the end-to-end grievance lifecycle.

### 📦 Simple ERD (entities only)

Use this when you're a product manager, business analyst, or anyone modelling reports / dashboards and you just need to see the entities, their attributes, and how they relate — without worrying about which microservice each one lives in.

Solid lines show real foreign-key relationships. Dotted lines show config that's consulted at runtime (templates, ID formats, validation rules) rather than joined.

<figure><img src="/files/D9mM1bJa151FW6Vl1vC8" alt=""><figcaption></figcaption></figure>

### Functional Data Model (with system boundaries)

Use this when you're an architect, engineer, or integrator and you need to know who owns what.

Every entity is colour-coded by its owning system — PGR's own database, the workflow service, MDMS master data, other DIGIT services, or operational config. Cross-boundary relationships are drawn explicitly, so you can see at a glance which service to call when you need a given field.

<figure><img src="/files/B43aDfzCm54ZcZAfcLxz" alt=""><figcaption></figcaption></figure>

### Complaints Management ERD (data owned by the service)

<figure><img src="/files/cTLxO4KD0SBLJ4pmKrxN" alt=""><figcaption></figcaption></figure>


---

# 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://docs.digit.org/complaints-management/design/architecture/data-model.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.
