MongoDB's SQL-to-NoSQL converter uses AI to smash the language barrier

Tell it what you want to do, and it spits out the relevant code

MongoDB has built an AI-powered SQL converter designed to help developers move from relational databases to its document-oriented NoSQL system.

One analyst told us that there are more to database migrations than converting SQL, and it remains unclear how much the product features would help productivity given the scale of migration projects in terms of testing and validation.

The move, which automates the translation of SQL into MongoDB's own query language, is one of a raft of new GenAI-type features to its database service, Atlas, which aims to smooth the developer experience and save time writing code.

MongoDB Compass lets developers use natural language to write executable MongoDB Query API syntax while incorporating other features. For example, developers can type "Filter pizza orders by size, group the remaining documents by pizza name, and calculate the total quantity," to generate the relevant code, MongoDB said.

Meanwhile, MongoDB Atlas Charts allows users to create data visualizations using natural language.

MongoDB Relational Migrator promises to automatically convert SQL queries and stored procedures in legacy applications to development-ready MongoDB Query API syntax by using a large language model. All three are available in preview.

Cheif prodct officer Sahir Azam told The Register that between a quarter and a third of MongoDB's customer projects have involved migrating an old database to its JSON-based system.

"A developer can either copy and paste in an existing SQL statement from their code or we can connect to a relational database and import view definitions or stored procedures, which are complex business logic in the database," he said. "It'll analyse that code via a large language model, and then spit out the appropriate MongoDB query language equivalent. And then the goal is to make that more accurate over time using reinforcement learning."

Analyst Matthew Aslett, veep and research director with Ventana Research, said: "Database migrations are far from easy, they're very costly, very complex. Anything that can help facilitate them is a good thing and it is a useful use case, particularly for the generative AI capabilities. Obviously, it's something that can look very good in a simple demo, but if you're looking at large scale, really complex queries, it remains to be seen how helpful it will be."

James Governor, co-founder of developer-focused analyst Redmonk, said MongoDB was not necessarily ahead of the competition in exploiting generative AI.

"Generative AI is so powerful that everyone is able to take advantage of them," he said. "It's not the competitive advantage in a sense of using OpenAI or not using it. GPT4 is going to be arriving soon and that's going to be a lot better at writing code. It's going to be able to write code for any of these platforms, and it's going to understand databases. It's not that any of the database companies are going to be massively ahead but on the other hand, you can't shut yourself off from those sorts of productivity enhancements." ®

More about

TIP US OFF

Send us news


Other stories you might like