How Should I Set This Up
Hi, I have been working on a site for a while now and I am completely stuck on a certain section.
The site allows parents to create small e-learning activities for young children, such as:
01 - pick out a certain color crayon from a bunch of crayons (1 additional step required - choose the color crayon that you want the child to pick out)
02 - pick out a certain animal from a bunch of animals (1 additional step required - choose the animal which you want the child to pick out)
03 - move the square object into the square hole (NO additional steps required)
+ many more...
If the parent chooses the first activity from the activity drop down menu when they are building the e-learning activity, they will then need to complete another step and enter in the color of the crayon... The same applies if they choose the second activity, as they will need to enter the animal name, HOWEVER, if the parent chooses the 3rd activity, no further steps / details are required.
I'm trying to figure out how to store the activities into the database and i am confused about how to do this as there are 3 groups of content which need to be saved in the database:
a - there are various different types of activities, which all have various different amounts of steps / settings required when building them which need to be displayed on the front end
b - then there is the chosen settings itself which have been applied / entered for each activity type (such as a chosen color or chosen animal) when an activity type has been chosen
c - and finally, there is the overall info itself that needs to be saved for each individual activity that is added to the site, such as child's name and parents name which are associated with each activity that has been created.
I am very confused as to how I can store all of this info and link it all together in a database and also, how the front end will know how many settings need to be applied / displayed when a user selects an activity type from the drop down at the start.
Thanks for reading all of the above, and a bigger thanks if you can provide any help on this...
I am just gonna think out loud. Lets get some ideas on the thread.
Parent selects activity
Based on Activity, Parent selects activity type (colour of crayon)
Store the relation in the database. In this case, Parent selects Monkey Worksheet with Blue crayon.
Activities has many Activity types
and Activity Types belong activity
The combination of both need to be stored in the database.
Now question: Do a certain Activity Type belong to any Activity? or does the activity type pertain only 1 activity? I.e. Only Monkey Worksheet can have blue crayons?
Activities are made up of any activity type, however each activity type will have their own set of attributes for each type
Can those attributes belong to any activity?
Originally Posted by oo7ml
AT(activity type), AB(attribute)
AT: Crayon -> AB: Blue
AT: Marker -> AB: Blue
Just add another field or two to the database
so activities can have more than 1 step, the problem you will run into is managing the database with these fields, which isn't really hard either, but requires an extra step or two to manage
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)