> For the complete documentation index, see [llms.txt](https://docs.neuroinfodb.org/nidb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neuroinfodb.org/nidb/specifications/data-storage-hierarchy.md).

# Data Storage Hierarchy

Data is stored in NiDB using a hierarchy. The root object is the **subject**. Each subject can be **enrolled** in multiple **projects**. Within each of those projects, the subject can have multiple imaging **studies** with different modalities. And within each imaging study, there are multiple series. Additionally **measures** and **drugs** are attached at the enrollment level. And **analyses** are attached to imaging studies.

![General data storage hierarchy](https://mermaid.ink/img/pako:eNqFkkFPgzAUx78KqReWwI1TTUxotpsmRo7iodK3UW1LU9oo2fbdbQUWcOB6eX-S3-vL-9EjqhoGCKODobqOHl_uSxX507r3D6hsXPR1k6YPoEwjhARl83h3yZt5w4wjy1w_SpsmNOSvz32I8reeCGcyy9_YWse6PC5CGe-5piTQ1hlo8_hpSOssM-7gwW0oU2o2KUwGw8ONxW-9Jj1y0lyD4ApOVFHRtdzj-ZDGBlBseXty2Z4sbj8zOJogi2uRiQJyQwEZFZAVBeSvArKmgCwqIP8osJ2A8bn4L9N8Ar7Lsizpc_rFma1xpr9LhRIkwUjKmX-hx9BfIluDhBJhHxnsqRO2RKU6e9RpRi3sGLeNQXhPRQsJos42RacqhK1xMEJbTv1_kAN1_gHc3gDZ)

Below is an example subject, enrolled in multiple projects, with imaging studies, and analyses.

![](https://mermaid.ink/img/pako:eNp9kkFvgjAUx78K6S6Q6AHlxBYTqi5Zohf1JjtU-pDOUkhb5pj63VeGOAm4Xt4r_f3f6_vTE4oyCshHe0nyxFqsnkNhmaWK3QdE2l67o7EX4KkzHE5AyIzzFIQO7Pktd9qKFof7ubpXLrNKEGwxJOSTZbL58l6D1bpraQorXdAysH-D5TYFH3DTKze-5-oKFQKSgQrsRRYRzr5BvuzkZOMeq7ACpZnY9-rOrxJAFTIGc12WA2cCzkQQXipmyv2dNmoQtH9uvMWSMKH-nbplYDMZ7h0cm-MUiOkOCtvLOrM4U9p5yFNZ7A08M6FD1q2uJo6cm2e47Vm8XL1ZmqiD5ba3o26xyr-OadjeGHytiVZdz3TJoXlZZiezA_hPnucN6nx4ZFQnvpd_oQFKQaaEUfOWT5U6RDqBFELkm5RCTAquQxSKi0GLnBINc8p0JpEfE65ggEihs3UpIuRrWUADzRgxvy29UpcfUa0P0Q)


---

# 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.neuroinfodb.org/nidb/specifications/data-storage-hierarchy.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.
