# Database Config ?s for classroom homework app

**URL:** <https://forum.adalo.com/t/database-config-s-for-classroom-homework-app/30221>\
**Category:** Get Help\
**Created:** [August 1, 2022, 6:54am UTC](https://forum.adalo.com/t/database-config-s-for-classroom-homework-app/30221 "2022-08-01T06:54:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bfarr37](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@bfarr37](https://forum.adalo.com/u/bfarr37)\
**Post date:** [August 1, 2022, 6:54am UTC](https://forum.adalo.com/t/database-config-s-for-classroom-homework-app/30221/1 "2022-08-01T06:54:05Z")

</div>

Hello! I’m new to Adalo. I have some database design experience, but it was years ago and I am struggling with configuration for a student class & homework app. Currently, I have 5 database collections (ERD below):

- **User** - students at the school
- **Classes** - all classes available at the school. A student will not be in every class
- **Homework** - homework assignments for each class
- **User Class Results** - this tracks the user’s enrolled classes & their status/grade in the class
- **User Homework Results** - tracks completion of each task for the user

I have designed the database with the following connections

- **User - Classes** (M:M) - student can be in many classes. A class can have many students
- **User - Homework** (M:M) - students can have many homework asmts. A homework assignment can be given to many students
- **Class - Homework** (M:M) - each class has many homework asmts. Each homework could be used in many classes (e.g., 2 first grade classes assign the same homework). I could design this 1:M, but prefer this model
- **User - User Class Results** (1:M) - a user would have many classes with different results, but those results would only be for 1 student
- **Class - User Class Results** (1:M) - a class would have many users with different results, but those results would only be for 1 class
- **User - Homework Results** (1:M) - a user would have many homework results, but each of those would only have 1 user
- **Homework - User Homework Results** (1:M) - a homework assignment would have many results for different users, but each homework result would only tie to one homework assignment

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/9/9/9949631ea2969e831d288f01b155ea8339da786f.png)

Questions:

1. Does this look correct or reasonable? Could it be more efficient?
2. Is this something Adalo can support? Specifically, it does not seem to handle M:M relationships well in the scenario below:

On the class page, each student should see a list of their Homework (ie. requirements). It should have a toggle to show if THAT student has completed those homework assignments

I can get the homework displayed here:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/f/9/f98d444def65163a01587a1bdf7a90373e4657dc.png)

But the toggle does not get down to data from the User Homework Results to show if they have completed that assignment or not.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/6/1/61a1d8071c4622173aba7692c1dd47003514144f.png)

I have considered assigning all the “Homework” when the user joins the class and then using that table, but I don’t think it’d automatically update if new homework was added to that class. Any help would be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [August 11, 2022, 6:54am UTC](https://forum.adalo.com/t/database-config-s-for-classroom-homework-app/30221/2 "2022-08-11T06:54:20Z")

</div>

Closed on August 11, 2022, 6:54am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
