# 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.
