I'm trying to switch my brain in to a NoSQL mode (document oriented database). I created a JSON datastructure that looks a little bit like this
{
"listInstances" : [
{
"listClassId" : 1,
"listInstanceName" : "Test",
"instanceFields" : {
"header" : [
],
"rows" : [
]
}
]
"listClasses" : {
"1" : {
"listClassName" : "Class A",
"fields" : {
"header" : [
],
"rows" : [
]
}
}
}
Essentially listClasses
are the templates for a listInstance
when a list instance is created it is assigned a template and it will take it's own copy of the fields (instanceFields).
Am I going about this the right way, this feels like a relational model (listClassId)?
Edit: As for the operations imagine an app that shows the listInstances in a table of some sort, this table can be added to (this is the point where the list class type is selected) and have instances removed, list entries can be modified to add or delete rows into their fields. The table entries can also be filtered on instance key/values (for example I'm not showing it here but imagine another key "instanceCategory").