As first sorry if I'm wrong with this here. For forwarding to the Right Place I'm grateful.

To my issue: I'm in an internship as a programmer, no real experience with databases, and as I'm open-minded accepted to compare Microsoft SQL Server with MongoDB if there would be benefits for the company to change to it.

For the original data I've selected the kinda biggest 3 tables.

Table: Article with over ~1,2 Mrd records

| article_id|  suppID | ...   | 
|    1      |     5   | ...   | 
|    2      |     6   | ...   |
|    3      |     7   | ...   |

Table: Price with over ~2,3 Mrd records

| price_id  |ArticleID| ...   | 
|    1      |     1   | ...   | 
|    2      |     2   | ...   |
|    3      |     3   | ...   |

Table: Price_Archive with over ~5,8 Mrd records

| article_id|  country| ...   | 
|    1      |     DE  | ...   | 
|    2      |     EN  | ...   |
|    3      |     EN  | ...   |

What are the main differences of SQL Server and NoSQL did I understand. But now more for the Technical Tests how can I achieve a comparison?

As for migration I do a simple Copy Paste and use the $lookup for some test scenarios. Furthermore creating a main single collection (Articles) and integrate the other 2 Tables in it, as its wanted in MongoDB-Document-Oriented.

Are there free tools where can log how much memory/time and so on is used for queries? Which other cases should I check?

closed as too broad by Erik Darling, mustaccio, Sean Gallardy, Philᵀᴹ, Tom V Apr 18 '17 at 18:28

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


SQL and NoSQL are different in many ways but the gist of it is that SQL is better at relational and NoSQL is better at non-relational. Each technology is suited for different purposes.

There are plenty of existing benchmarks and comparisons between the two such as here, here and here. Be wary of the bias in comparison articles and note that when someone says NoSQL is faster it could mean with less reliability.

To benchmark SQL queries you can look up the following:


Or use something similar to this:

SET @DateTimeStamp = current_timestamp
... --do some stuff to measure here
PRINT CAST(DATEDIFF(ms, @DateTimeStamp, current_timestamp) AS VARCHAR) + 'ms'

To benchmark MongoDB queries you can look up the following:

  • .explain("executionStats")
  • mongodb executionTimeMillis

Here are some comparisons between the two:


  • More expensive initial cost
  • Relational
  • Better data integrity with transactions ( more overhead )
  • More common so more developers have experience with it
  • More proven security
  • Paid tools for metrics and monitoring such as Solar Winds and Idera
  • There are likely free tools but I am not aware of them

NoSQL ( MongoDB )

  • Less expensive initial cost
  • Non-relational
  • No transactions ( less overhead )
  • Asynchronous INSERT and UPDATE
  • Depending on Write Concern Values it could be faster with less reliability or slower with more reliability
  • Possibly more scalable
  • Less proven security
  • Paid tools for MongoDB server metrics and monitoring such as Server Density.

A few quickies

  • MongoDB is OSS licensed under the GNU/GPL. Microsoft is not OSS. Support, development, etc is way different in OSS compared to traditional priorietary development.
  • SQL Server uses the SQL Query Language. MongoDB does not.
  • MongoDB is stored as BJSON (data as documents) in collections. SQL Server uses relational database tables.

If you were to compare the speed of the two, it would greatly differ based on a number of things. First, the data itself. Since you are in school, take something like a faculty and student database. Storing and querying anything from this DB would be dependent on the structure, indexes, hardware, etc. It may be better for a RDMS. However, if you were trying to merge a lot of data from different devices, i.e. Internet of Things (IoT) like perhaps the RFID sensors of employee badges with the security access logs of the doors on a building along with then MongoDB may be a better solution.

I think you should break this question down first not based on the technical feasibility, but first is the organization positioned to adopt OSS in a production environment. Does it have the personnel qualified to handle a MongoDB? Can it trouble shoot it as easily? Will the company need middleware to integrate with other production applications that MongoDB doesn't directly support? is the cost benefit analysis favorable? Then I would focus on the technical requirements of the project at hand. Remember, you dont have to just pick one. Perhaps a RDMS like SQL Server would benefit one business unit while a NoSQL environment would benefit others.

Not the answer you're looking for? Browse other questions tagged or ask your own question.