Relational Migrator

6 results

AI-powered SQL Query Converter Tool is Now Available in Relational Migrator

When I traveled to Japan for the first time it was shortly after translation apps on smartphones had really taken off. Even though I knew enough phrases to get by as a tourist I was amazed at how empowered I was by being able to have smoother conversations and read signs more easily. The power of AI helped me understand a language I had only a passing familiarity with and drastically improved my experience in another country. I was able to spend more time enjoying myself and spend less time looking up common words and sentences in a phrase book. So what does this have to do with application modernization? Transitioning from relational databases as part of a modernization effort is more than migrating data from a legacy database to a modern one. There is all the planning, designing, testing, refactoring, validating, and ongoing operation that makes modernization efforts a complex project to navigate successfully. MongoDB’s free Relational Migrator tool has helped with many of these tasks including schema design, data migration, and code generation, but we know this is just the beginning. One of the most common challenges of migrating legacy applications to MongoDB is working with SQL queries, triggers, and stored procedures that are often undocumented and must be manually converted to MongoDB Query API syntax. This requires deep knowledge of both SQL and the MongoDB Query API, which is rare if teams are used to only using one system or the other. In addition, teams often have hundreds, if not thousands of queries, triggers, and stored procedures that must be converted, which is extremely time-consuming and tedious. Doing these conversions manually would be like traveling abroad and looking up each object one by one in a phrase book instead of using a translation app. Thankfully with generative AI, we are finally able to get the modern version of the translation app on your phone. The latest release of Relational Migrator is able to use generative AI to help your developers quickly convert existing SQL queries, triggers, and stored procedures to work with MongoDB using your choice of programming language (JavaScript, C#, or Java). By automating the generation of development-ready MongoDB queries, your team can be more efficient by redirecting their time to more important testing and optimization efforts — accelerating your migration project. Teams that are familiar with SQL can also use the Query Converter to help close their MongoDB knowledge gap. The SQL objects they're familiar with are translated, making it easier to learn the new syntax by seeing them next to each other. Let’s take a closer look at how Query Converter can convert a SQL Server stored procedure to work with MongoDB. Figure 1: The MongoDB Query Converter Dashboard We’ll start by importing the stored procedure from the relational database into our Relational Migrator project. This particular stored procedure joins the results from two tables, performs some arithmetic on some of the columns, and filters the results based on an input parameter. CREATE PROCEDURE CustOrdersDetail @OrderID int AS SELECT ProductName, UnitPrice=ROUND(Od.UnitPrice, 2), Quantity, Discount=CONVERT(int, Discount * 100), ExtendedPrice=ROUND(CONVERT(money, Quantity * (1 - Discount) * Od.UnitPrice), 2) FROM Products P, [Order Details] Od WHERE Od.ProductID = P.ProductID and Od.OrderID = @OrderID Developers who are experienced with the MongoDB aggregation framework would know that the equivalent method to join data from two collections is to use the $lookup stage. However, when migrating a relational database to MongoDB, it often makes sense to consolidate data from multiple tables into a single collection. In this example, we are doing exactly that, by combining data from the Orders , Order Details , and Products table into a single orders collection. This means that, when considering the changes to the schema, we do not actually need a $lookup stage at all, as the data from each of the required tables has already been merged into a single collection. Relational Migrator’s Query Converter works alongside the schema mapping functionality and automatically adjusts the generated query to work against your chosen schema. With JavaScript chosen as our target language, the converted query avoids the need for a costly join and includes MongoDB equivalents of our original SQL arithmetic functions. The query is now ready to test and include in our modernized app. const CustOrdersDetail = async (db, OrderID) => { return await db.collection('orders').aggregate([ { $match: { orderId: OrderID } }, { $unwind: '$lineItems' }, { $project: { ProductName: '$product.productName', UnitPrice: { $round: ['$lineItems.unitPrice', 2] }, Quantity: '$lineItems.quantity', Discount: { $multiply: ['$lineItems.discount', 100] }, ExtendedPrice: { $round: [ { $multiply: [ '$lineItems.quantity', { $subtract: [1, '$lineItems.discount'] }, '$lineItems.unitPrice' ] }, 2 ] } } } ]).toArray(); }; Relational Migrator does more than just query conversion, it also assists with app code generation, data modeling, and data migration, which drastically cuts down on the time and effort required to modernize your team's applications. Just like a language translation app while traveling abroad it can drastically improve your experience converting and understanding a new language or technology. The new Query Converter tool is now available for free for anyone to try as part of a public preview in the Relational Migrator tool. Download Relational Migrator and try converting your SQL queries and stored procedures today.

March 25, 2024

Evolve Your Data Models as You Modernize with Hackolade and Relational Migrator

Application modernization has always been a constant. For many developers and database administrators, the realization that their legacy relational databases that have served their apps well to this point are no longer as easy and fast to work with has become glaringly apparent as they strive to incorporate emerging use cases like generative AI, search, and edge devices into their customer experience at an increasing rate. While many are turning to MongoDB Atlas for the flexible document model and wide range of integrated data services, migrations are often seen as daunting projects. MongoDB Relational Migrator has simplified several of the key tasks required to successfully migrate from today's popular relational databases to MongoDB. With Relational Migrator, teams can design their target MongoDB schema using their existing relational one as a blueprint, migrate their data to MongoDB while transforming it to their newly designed schema, and get a head start on app code modernization through code template generation and query conversion. But as organizations scale their MongoDB footprint through migrations and new app launches, a new challenge emerges: managing and evolving data models with more teams and stakeholders. Sooner or later, modernization becomes as much about change management as it does technology — keeping teams aligned is critical for keeping everyone moving forward. This is where Hackolade comes in. Hackolade Studio is a visual data modeling and schema design application that enables developers to design and document their MongoDB data models, and more importantly, use those entity-relationship diagrams (ERDs) to collaborate with their counterparts in other areas of the business, like database administration, architecture, and product management. MongoDB data model in Hackolade Studio No database is an island, and the teams working with MongoDB cannot afford to work in isolation. With Hackolade Studio, database teams can use these ERDs to translate their point-of-view to others, making hand-offs and handshakes with other teams like operations more seamless, driving developer productivity, and accelerating new feature builds. Jump from Relational Migrator to Hackoldate Studio with ease Hackolade Studio is now making it even easier to transition to their application after using MongoDB Relational Migrator to complete their migrations. Teams can now use Hackolade Studio’s reverse-engineering feature to import their Relational migrator project (.relmig) files, bringing their MongoDB schema directly over into Hackolade Studio. With this integration, teams can start with Relational Migrator to build their initial schema and execute their data migration, then transition to Hackolade Studio to document, manage, and evolve their schema going forward - giving them a greater degree of control, visibility, and collaboration needed to support modernization initiatives that include many migrations across several applications, teams, and legacy relational environments. MongoDB Relational Migrator, showing a relational schema on the left and its transformed MongoDB schema on the right Getting started is incredibly easy. First, you’ll need your Relational Migrator project file, which can be exported from Relational Migrator to your local device. Then in Hackolade Studio, use the reverse-engineering workflow to import your .relmig file into a new or existing data model. For a detailed walkthrough, dive into Hackolade’s documentation for this integration. Importing Relational Migrator files in Hackolade Studio As MongoDB adoption grows within your organization, more apps and more teams will need to interact with your MongoDB data models. With Relational Migrator and Hackolade together, you will have the tools at your disposal to not only kickstart migration projects but also manage MongoDB data models at scale, giving your teams the insights and visibility needed to drive performance and guide app modernization initiatives. Learn more about how Hackolade can maximize developer productivity and support your modernization to MongoDB initiatives. Download MongoDB Relational Migrator for free to get started with migrating your first databases.

January 17, 2024

New Intelligent Developer Experiences for Compass, Atlas Charts, Relational Migrator, and Docs

This post is also available in: Deutsch , Français , Español , Português , 日本 . Today, MongoDB announced a range of innovations in its developer data platform, creating new, intelligent developer experiences in familiar tools like MongoDB Compass, Atlas Charts, Relational Migrator, and MongoDB Documentation that radically simplify and accelerate how developers build modern applications. These new experiences provide developers with guided and intelligent assistance for their development processes in: MongoDB Compass: Where developers can use natural language to compose everything from simple queries to sophisticated, multi-stage aggregations. MongoDB Relational Migrator: Where developers can convert SQL queries to MongoDB Query API syntax. MongoDB Atlas Charts: Where developers can use natural language to generate basic data visualizations. MongoDB Documentation: Where developers can ask questions to an intelligent chatbot, built on top of MongoDB Atlas and Atlas Vector Search, to enable lightning-fast information discovery and troubleshooting during software development. Developer time is one of the most precious commodities in any organization, and with business and customer expectations continuing to rise, developers are under increasing pressure to deliver applications quickly. With more intelligent experiences across the MongoDB developer data platform, it is now simpler and easier than ever to build modern applications for virtually any use case. Check out our AI resource page to learn more about building AI-powered apps with MongoDB. Natural Language Queries in Compass Building queries and aggregations is one of the most prominent developer use cases for Compass , MongoDB’s popular, downloadable GUI tool. Compass’ new, intelligent experience allows developers to use natural language to compose sophisticated aggregations to query, transform, and enrich data, reducing the complexity and learning curve to build queries into application code. The new experience is being released in Public Preview in version 1.40.0 and will be rolled out incrementally to users starting today until the end of October. To get started, make sure you have 1.40.0 downloaded on your machine and have access to the feature. Then you can navigate to the Documents tab and click on the Generate Query button in the query bar, which opens a second bar below the standard query bar where you can enter natural language prompts to generate the Query API syntax for you to execute against your data. Be sure to hit the “thumb’s up” or “thumb’s down” button to rate the helpfulness of the query generated. SQL Query Conversion in Relational Migrator Migrations are part of many developers’ journeys with MongoDB. Earlier this summer at MongoDB.Local NYC, we announced Relational Migrator to help teams with these projects, and we’re continuing to make it easier to modernize application code. Many legacy systems have hundreds, if not thousands of SQL queries that must be modernized as part of any migration effort, and that can be a time-consuming, if not daunting task. Now in Private Preview, developers can use Relational Migrator to convert existing SQL queries and stored procedures into development-ready MongoDB Query API syntax. With SQL query conversion, developers can leverage Relational Migrator to eliminate the manual effort of creating MongoDB queries at scale - speeding up migration projects. SQL query conversion is currently available in Private Preview, and access can be requested directly from the latest version of Relational Migrator. Natural Language Support in Atlas Charts Atlas Charts is the best way for developers to visualize Atlas data. By offering an effortless and powerful solution for gaining data-driven insights, Charts empowers developers and the businesses they help scale. What has always been easy is now becoming more intelligent too! Available in Private Preview, a new natural language mode allows developers to visualize their data through a simple language query, for example: “show me a comparison of annual revenue by country and product.” This is just the start. Later this year, natural language support will extend to more complex queries and chart types. Sign up today to try out natural language support for building charts! Stay tuned for more updates from the team and check out our documentation to learn more about what’s supported by natural language during Private Preview! Intelligent Chatbot for MongoDB Documentation Documentation is critical to the developer experience, making it easier to discover product features and capabilities and troubleshoot common challenges during software development. MongoDB is now super-charging your experience with an intelligent chatbot that improves information discovery by surfacing and summarizing the most relevant documentation. Built with MongoDB Atlas and Atlas Vector Search, the chatbot allows you to ask questions in natural language like “How do I get started with MongoDB Atlas?” or “How do I add a new IP address to the IP access list for my Atlas project?” and receive a response with reference articles, code examples, and other relevant information. MongoDB will also be open-sourcing and providing educational materials about how we built the intelligent chatbot, making it that much easier for others in the community to use the power of MongoDB Atlas and Atlas Vector Search to create dynamic and educational experiences for their end users. Data Privacy and Security MongoDB is trusted by some of the world's most security-conscious organizations, who use the developer data platform’s robust data security and privacy controls to manage their most sensitive data assets. To maintain this trust, these new developer experiences will always be transparent about what data is accessed and used, allowing customers to make informed decisions within the boundaries of their unique security, privacy, and compliance concerns. Get Started Today With new, intelligent features that allow developers to interact with their data using natural language in Compass, Relational Migrator, and Charts, as well as an intelligent chatbot for MongoDB Documentation, it’s easier than ever to take advantage of the flexibility and scalability of MongoDB's document data model to build any class of application. If you have feedback on these experiences, you can enter a suggestion in our user feedback portal .

September 26, 2023

News From MongoDB.local NYC: Game-changing Migration Tool Now Available

This post is also available in: Deutsch , Français , Español , Português The database has always been the heart of an application. Teams recognize that the choice of a database is one of the most critical decisions in developing software, influencing not only the speed at which developers can build and iterate, but also an application’s performance, functionality, and overall user experience. Today, tens of thousands of organizations are being held back by their legacy systems built on relational databases. They struggle with the headaches, high costs, and poor developer agility caused by data silos and architecture sprawl built up over decades as they try to address new requirements and build transformative experiences. Modernizing the data infrastructure means reducing architectural complexity, and adopting flexible data platforms like MongoDB that can support a wider range of use cases and data types. But every IT leader knows that transitioning away from legacy databases is easier said than done, and that they are often overwhelming and time-consuming projects. This is even more true when trying to shake the relational database mindset and instead adopt a developer-first approach to data. MongoDB's Relational Migrator is now available to help organizations streamline their transition from relational databases to MongoDB by tackling some of the most common challenges we see in migration projects: effective data modeling, migrating data, and modernizing app code. Today, Relational Migrator supports migrations from Oracle, SQL Server, MySQL, and PostgreSQL directly. By switching to MongoDB, companies can reap major rewards when it comes to modernizing an essential component of their software. Not only do they enjoy faster development and performance, but also improved reliability, scalability, and user experience. Additionally, MongoDB's advanced features, such as full-text search, time-series data support, and edge-to-cloud synchronization enable applications to take on more use cases on an efficient, easy-to-maintain data infrastructure. With Relational Migrator, teams preparing for app modernization projects can accelerate and reduce the risk of their relational database migrations so they can start taking advantage of everything MongoDB has to offer. Take the guesswork out of the migration process Data modeling in MongoDB is one of the most common barriers we see when organizations come over from a relational background. MongoDB can be treated like a relational database, but to unlock the full potential of the document model organizations need to change how they think about their data and model it for how their applications are going to use it. Relational Migrator takes the guesswork out of data modeling by analyzing an application's existing relational schema and proposing a recommended MongoDB schema based on best practices. As teams use the visual interface to compare and build their schema, Relational Migrator will continue to offer recommended mappings to further expedite schema design, but more importantly, help developers do it well. Not only does Relational Migrator visually compare schemas, but it also applies the transformations as it moves data into MongoDB in an efficient manner, providing users with the ability to run both systems in parallel and apply changes from the source database to MongoDB on an ongoing basis. Migrating data is only one part of application modernization. To give developers a head start, Relational Migrator even generates app code for various development languages and frameworks that reflects the new MongoDB schema they’ve designed. With the launch of Relational Migrator, MongoDB is unlocking the full potential of its powerful developer data platform , providing new implementation possibilities for customers and a wider range of applications. Learn more about what Relational Migrator can do for you. Head to the MongoDB.local hub to see where we'll be showing up next.

June 22, 2023

Migrate to MongoDB Atlas on AWS with Relational Migrator

>> Announcement: Some features mentioned below will be deprecated on Sep. 30, 2025. Learn more . Competitive advantage is directly tied to how well companies are able to build software around their most important asset: data. Rigid relational schemas often require downtime and significant application code updates in order to make even simple modifications, such as adding a new data attribute. In MongoDB, entities are modeled as documents that map naturally to the same objects that developers are used to working with in their programming languages. Additionally, legacy relational databases were not built to scale horizontally. Sharding data to handle large data volumes and ensure lower latency is typically a significant manual process that requires custom application logic to query across multiple shards and aggregate results. MongoDB Atlas is an effective solution for solving such problems, and MongoDB Relational Migrator streamlines the process of moving to MongoDB from a relational database. MongoDB Atlas on Amazon Web Services (AWS) MongoDB Atlas removes the need for a complex object-relational mapping layer and allows developers to build and release new features quicker. MongoDB Atlas is built to be distributed and to handle sharding transparently to the developer. With Atlas, no application code changes are necessary when an application needs to scale out from a 10MB to a 500TB dataset. MongoDB Atlas is well integrated into the AWS environment, and the document-based database works seamlessly with AWS products. To learn more about common integration and project requirements, refer to Managed MongoDB on AWS . Migrate to Atlas on AWS with Relational Migrator Some customers have successfully migrated their relational workloads to MongoDB Atlas on AWS. One example is Cox Automotive, whose system was hitting limitations on the relational database. The company migrated to Atlas on AWS and leveraged capabilities like Atlas Data Lake (powered by Amazon Simple Storage Service (Amazon S3)) and Atlas App Services . Read our customer case study to learn more about how Cox Automotive uses MongoDB Atlas . At the same time, other companies have struggled with how to approach this challenge. When considering such a migration, it’s important to think carefully about data modeling. Although it’s possible to naively move a relational schema into MongoDB without any changes, this approach won’t deliver many of MongoDB’s benefits. A better practice is to design a new and better MongoDB schema that’s more denormalized and potentially to take the opportunity to revise the architecture of the application as well. To make this process easier, we’re developing MongoDB Relational Migrator . Relational Migrator streamlines the process of moving to MongoDB from a relational database and is compatible with Oracle, Microsoft SQL Server, MySQL, and PostgreSQL. MongoDB Relational Migrator connects to a relational database to analyze its existing schema, then helps architects design and map to a new MongoDB schema. Migration support When you’re ready, Relational Migrator will perform the data migration from the source RDBMS to MongoDB. Migration can be a one-shot migration if you’re prepared for a hard cutover. And soon, we will also support a continuous sync in case you need to leave the source system running and continue pushing changes into MongoDB. With Relational Migrator, you can map your relational schema—or just a piece of it, if needed—to a new MongoDB schema. Relational Migrator helps the design and mapping process with common MongoDB schema design patterns built in. Based on this schema mapping, you can move data into a target MongoDB cluster. Relational Migrator will support both Snapshot (one-time) and continuous data migration. Get more details on Relational Migrator on the product page or in the deep dive presentation from MongoDB World. Get started with MongoDB Atlas in AWS Marketplace today.

November 3, 2022

Free your data with the MongoDB Relational Migrator

Nothing is more frustrating than data that is just out of reach. Imagine wanting to combine customer behavior data from your CRM and usage data from your legacy product to trigger tailored promotions in your new mobile app, but not being able to locate the required data in the sea of tables in your relational database. As MongoDB CTO Mark Porter explains in his MongoDB World keynote , the data that can make a difference might be locked up “somewhere that you can’t use.” Relying on his own hard-earned experience with data, Porter adds that this information can be trapped “in a schema with hundreds or thousands of tables that have built up over decades.” “Schema is a huge part of this problem,” MongoDB product manager Tom Hollander explains during a presentation on MongoDB Relational Migrator at MongoDB World 2022. “So we’ve spent a lot of time building out the tools to enable you to map your tabular relational schema into a document schema and make use of the full power of the MongoDB document model.” To see MongoDB Relational Migrator in action, check out this introduction and demo from MongoDB World 2022, featuring MongoDB product manager Tom Hollander. What is MongoDB Relational Migrator? MongoDB Relational Migrator streamlines migrations from legacy data infrastructure to MongoDB by helping developers analyze relational database schemas, convert them into MongoDB schemas, and then migrate data from the source database to MongoDB. Currently, Relational Migrator is compatible with four of the most common relational databases: Oracle, SQL Server, MySQL, and PostgreSQL. Migrator not only moves data from your relational database to MongoDB, but it also transforms it according to your new schema. As Hollander and MongoDB product marketing director Eric Holzhauer point out , developers often use a mix of software and tools (e.g., extract-transform-load pipelines, change data capture (CDC), message queues, and streaming) to execute migrations, which can be complicated, risky, and error-prone. Relational Migrator provides a single tool that can streamline the process while simultaneously ensuring that your data lands in an organized, logical manner. By simplifying schema translations — one of the most complex, difficult parts of any relational migration — Relational Migrator grants developers and other technical teams a greater degree of control over (and increased visibility into) their new MongoDB schema. The result is to make data more accessible for analysis and decision making. “Now I can get at the data in my program without going through a translation layer,” Porter explains. A visual representation of how Migrator maps relational schema to document schema. Migration mode: Snapshot or ongoing? Migrator provides two modes of data transfer: a one-time snapshot or a continuous sync (which will be available later this year). To help decide which mode you should use, consider whether you can move over to MongoDB and immediately decommission your previous database or whether you need to keep your existing relational database up and running. Organizations may wish to keep their relational database for various reasons, such as testing the effectiveness of your proposed document schema, running out the contract or licensing agreement to avoid expensive fees, or keeping old databases available for audits. In this situation, you can keep your relational database running so that Relational Migrator will continue to push data from your source to your new MongoDB clusters. The limits of Relational Migrator As Hollander points out, Relational Migrator is only a tool — one intended to facilitate schema mapping, providing many abilities and options for effective schema design. “It’s not a silver bullet that will immediately modernize your application portfolio,” Hollander says. “It’s not going to do everything for you. You still have to do the planning.” Furthermore, because database schema is a tricky topic even for seasoned experts, Hollander recommends that developers would benefit from working with architects, consultants, and partners — especially if they’re not familiar with MongoDB or schema design best practices. Relational Migrator does not yet support continuous replication, which would enable your relational database and MongoDB clusters to coexist for an extended period of time. However, Hollander says that work on this feature is ongoing and it will be available in the future, along with additional capabilities like schema recommendations, an integration for the MongoDB Atlas developer data platform, and more. MongoDB Relational Migrator is currently in private preview, for use on non-production workloads with assistance from our Product and Field Engineering teams. To learn more, get in touch with your MongoDB rep or contact us via our Migrator page to discuss your workload and next steps.

September 6, 2022