# Data Model

### DB Schema

The schema serves as a blueprint for creating and maintaining the database that supports the ML survey services data storage and retrieval operations.

![ML-Survey Service](https://ml-services-uploads.s3.ap-south-1.amazonaws.com/DBSchema/ML-Survey.png)

#### Here are examples of sample data for each collection

#### [programs](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/programs.json)

Programs collection is tasked with housing high-level program information, encompassing program specifics, resource listings, and program categorizations.

#### [solutions](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/solutions.json)

The solutions collection will serve as a repository for various types of resources, encompassing observations, improvement projects, and surveys, among others.

#### [programUsers](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/programUsers.json)

The programUsers Collection holds user data of those who have become part of the program and have provided their consent status.

#### [observations](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/observations.json)

The observations collection is utilized to store observations generated by users.

#### [observationSubmissions](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/observationSubmissions.json)

The observationSubmissions collection will be responsible for storing data related to observations when users submit their observations.

#### [surveys](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/surveys.json)

The observations collection is utilized to store survey generated by users.

#### [surveySubmissions](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/surveySubmissions.json)

The surveySubmissions collection will be responsible for storing data related to observations when users submit their survey.

#### [criteria](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/criteria.json)

The criteria collection will contain all the criteria necessary to fulfill observations and surveys.

#### [criteriaQuestions](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/criteriaQuestions.json)

The criteriaQuestions collection will house all the questions associated with criteria for both observations and surveys.

#### [frameworks](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/frameworks.json)

The frameworks collection will be used to store templates designed for observation-based solutions.

#### [questions](https://github.com/shikshalokam/ml-survey-service/blob/master/DBSchema/questions.json)

The questions collection will hold all the questions intended for use in both observations and surveys.

[Click here](https://ml-services-uploads.s3.ap-south-1.amazonaws.com/DBSchema/ML-Survey.pdf) for DB schema and corresponding examples in a PDF format.


---

# Agent Instructions: 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:

```
GET https://ed.sunbird.org/release-6.0.0/use/source-code/manage-learn/ml-survey-service/data-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
