SQL to NoSQL

 

SQL Query
MongoDB / NoSQL


This SQL to NoSQL converter allows to convert SELECT statment to MongoDB method find.This tool may be useful for those unfamiliar with NOSQL but have SQL knowledge.With basics in SQL, you can easily get the corresponding code in NoSQL.

This tool has many limitations, is in beta version, for now, you can only convert SELECT queries.It is just a tool to quickly see the mappings between SQL and NoSQL.The result should be corrected by you before using. The generated NoSQL code should of course not be used directly in your projects, but should be modified and corrected.
Non-exhaustive limitations:

  • Joins are not supported
  • Subqueries are not supported
  • Handling of parentheses is incorrect
  • Not all operators are supported
  • Group by / Aggregation are not supported
  • And many more things ...

User guide

How to convert SQL query to MongoDB / NoSQL?

  • Drag and drop your SQL file or copy / paste your SQL text directly into the editor above.
  • Your SQL is automatically converted to NoSQL.
  • In order to download the results you must click on "Download NoSQL" button.
  • You can also copy the NoSQL to the clipboard by clicking on the button "Copy to clipboard".

SQL to MongoDB Converter

The use of NoSQL databases is quite simple compared to relational databases. Learning SQL takes time, especially for advanced notions.NoSQL is relatively easy to understand and learn.But when you are used to using SQL, it can be a bit confusing at first.

This tool can be useful when you discover NoSQL. In a few seconds, you can see the NoSQL code corresponding to our Select query.You can do several live conversions to quickly understand how NoSQL works.

Correspondence between SQL statments and mongoDB methods:

  • Select: find
  • Uodate: updateOne / updateMany / findOneAndReplace / findOneAndUpdate
  • Insert: insertOne / insertMany
  • Delete: deleteOne / deleteMany / findOneAndDelete
  • Drop table: drop
  • ...
MongoDb also offers other methods that may be useful. Do not hesitate to consult the online documentation.