> 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)
