You are not logged in.
Sorry for this newbie question !
The sharding facilitated by mORMot sounds very interesting ! I want to learn this practice with a "Classroom - class" relationship:
"Classroom" :
(1) "Classroom" instances, which will be available for a certain period (e.g., half a day), will be announced.
(2) Each "Classroom" can accommodate one "Class" at a given time.
(3) Once "Classroom" is free from a previous "Class", it may accommodate another "Class".
"Class"
(1) "Class" instances, which will need to be taught at a given time, will be announced.
(2) Each "Class" will be taught in one "Classroom" at a given time.
With multiple-table-paradigm, a new "Assignment" table can help to model this relationship.
Right now I don't have any idea how to model this relationship using sharding. Could you help to give me some suggestions ?
If it is not possible to use sharding, could you help to comment how to identify whether sharding fits a relationship in practice ?
Many thanks for your time and comments !
Offline
Please ensure you read the "sharding" information in the latest SAD pdf.
And also the general introduction to NoSQL / normalization / denormalization in it.
You will find some rules in there.
Offline
Thanks for your comments. I have been reading your SAD document but have no clue.
Do you mean it is possible to model this "classroom-class" relationship using sharding ?
If you think this is an improper question for you, please just say so .
Offline
In short, you "denormalize" data according to the requests you may potentially need.
But since the same data can now be at several places in the database, you have to ensure its coherency.
That is, once data is denormalized, you should ensure that any modification in one place will also be manually modified in the other places - unless you do not need the update (if e.g. it's OK for you that the "old" value remains untouched, as its historical value).
Offline