Tag: mongodb
Migrating From PostgreSQL to MongoDB in a .NET EF Core Application
For many reasons—including scalability, flexibility, and modernization—more and more development teams are looking to migrate away from PostgreSQL to MongoDB. In the past, these teams might have been hesitant if they used Entity Framework Core (EF Core) as their object relational mapper (ORM).
With EF Core being one of the most popular ORMs for .NET development, we received a lot of requests from the community for a provider, and so did Microsoft! So it made sense for MongoDB to develop a provider for EF Core. This went generally available (GA) in May 2024 and has been greatly received by the community.
Plus, developers can now use MongoDB's Relational Migrator, a free tool that uses smart algorithms and GenAI to streamline migrating from legacy relational databases to MongoDB, accelerating application modernization initiatives. So now is a great time to take a look at how you too can reap the benefits of all this by migrating your .NET application that uses PostgreSQL with EF Core, to use the MongoDB EF Core Provider.
In this tutorial, we will start off with a simple application that uses PostgreSQL as the database under the hood, and update it to still take advantage of EF Core but use MongoDB instead. So let's get started!
Read MoreData Modeling for Java Developers: Structuring With PostgreSQL and MongoDB
Application and system designs have always been considered the most essential step in application development. All the later steps and technologies to be used depend on how the system has been designed. If you are a Java developer, choosing the right approach can mean distinguishing between a rigid, complex schema and a nimble, scalable solution. If you are a Java developer who works with PostgreSQL or other relational databases, you understand the pain of representing the many-to-many relationships between the tables.
This tutorial will ease your pain with these or other relationships defined in databases by making use of a document database, MongoDB.
In this article, we’ll understand both approaches, contrasting PostgreSQL’s relational rigour with MongoDB’s document-oriented simplicity. You’ll learn how to weigh trade-offs like ACID compliance versus scalability and discover why MongoDB’s design might save you time.
Read MoreBuild a Basic CRUD Application With Flask-PyMongo
In this tutorial, we will dive head first into utilizing MongoDB’s Flask-PyMongo library! We will build a basic CRUD (create, read, update, delete) Flask-PyMongo application and learn about how intuitive this library is for building fully functional Flask applications.
Read MoreGetting Started With Queryable Encryption in the MongoDB C# Driver
With the release of MongoDB 7.0 in August 2023, we introduced a feature called Queryable Encryption, the first of its kind. With queryable encryption, your data is encrypted, even at rest, with the server unable to read it either but still able to execute queries against it. You can specify what fields to encrypt so you can encrypt as much or as little of your document as you need.
The great news is, not only is this available for all tiers, but it is supported in our C# driver too!
In this tutorial, we are going to add queryable encryption to a healthcare application, ensuring that private information, such as social security number (SSN) and date of birth, is encrypted.
Read MoreBuilding a Real-Time AI Fraud Detection System with Spring Kafka and MongoDB
In this tutorial, we'll build a real-time fraud detection system using MongoDB Atlas Vector Search, Apache Kafka, and AI-generated embeddings. We'll demonstrate how MongoDB Atlas Vector Search can be used to detect anomalies in a stream of financial transactions by analyzing a user's transaction history and identifying suspicious behavior based on LLM-generated embeddings.
Our solution will monitor MongoDB Change Streams using the Java synchronous driver, triggering vector searches on each new transaction to detect potential fraud. While this approach works well for our demo, and for many use cases, we’ll also discuss its limitations. Throughout the tutorial, I’ll cover alternative strategies to optimize performance, whether you need higher transaction throughput, faster fraud detection, or a more scalable architecture.
Read MoreGrab a Pint With Django-MongoDB-Backend, Voyage AI, and LangChain
DjangoCon Europe is just around the corner, and this year, it’s in Dublin, Ireland. This means two things:
- I’m legally required to drink my first Guinness (yes, first ever!).
- I obviously had to build an app to help me find the best pubs to accomplish my Guinness goal.
This full-stack, AI-powered Dublin City Center Pub Finder app is built using our new Django MongoDB Backend Python package, Voyage AI embeddings to best understand the queries, and LangChain to power our natural-language interface.
So, if you’re in Dublin and you really want a “Guinness, outside, with live music,” this Pub Finder will help you find the three best options!
Before we go into how it works and how you can build it yourself, let’s go over the platforms used.
Read MoreServerless Development with Kotlin, AWS Lambda, and MongoDB Atlas
As seen in a previous tutorial, creating a serverless function for AWS Lambda with Java and MongoDB isn't too complicated of a task. In fact, you can get it done with around 35 lines of code!
However, maybe your stack doesn't consist of Java, but instead Kotlin. What needs to be done to use Kotlin for AWS Lambda and MongoDB development? The good news is not much will be different!
In this tutorial, we'll see how to create a simple AWS Lambda function. It will use Kotlin as the programming language and it will use the MongoDB Kotlin driver for interacting with MongoDB.
Read More