I am starting this post to start a discussion on whether a relational database like SQL or a non-relational database like MongoDB will be an ideal choice for DiscourseDB.
To make this choice, first question which needs to be answered is whether our data is completely relational or not. As data will be coming from several online learning environments, we cannot assume all the data having same fields/attributes/properties. That’s where NoSQL comes into picture, in particular MongoDB. When your data is not relational there can be major benefits to using NoSQL databases like performance and scalability.
Second question which needs to be answered is whether we want want writing data to be easier or reading data to be easier. MongoDB makes reading data really easy and fast (complicated SQL query that joins and aggregates a bunch of data on the fly vs. fetching a single json document from mongo database), but can make writing data quite complicated.
In MongoDB, your data is the schema and there is symmetry between the way data goes into the database and the way it comes out. With traditional technologies, the differences between what it means to put data in and take data out increase as applications get more complex. Below is an example showing how a complicated sql schema can be represented into a simple mongodb json.