To understand how using a graph database alongside a document database can enhance our application, let’s consider a specific use case: that of a course catalog for an online course system. We need to be able to populate the application view of our product catalog with a single query. The functional requirements here need to support a diverse product portfolio with complex querying and filtering across many product attributes. ![]() Using a document data model allows MongoDB to make use of unstructured data and query it in an efficient way, using indexes.Ī core use case for a document database is to back search and browsing for a product catalog, supporting an e-commerce application. Although MongoDB uses BSON, you can think of JSON as a close analog of the data model. MongoDB is one of the leading document databases, a type of NoSQL database with a document-based data model.ĭocuments can contain key-value pairs, arrays and nested documents (a document of documents). Here we use a key-value store to power the user shopping cart, a document database for product catalog search and browsing and a graph database for real time personalized recommendations. And finally examine a new community project, the Neo4j Doc Manager for Mongo Connector, that enables real-time synchronization of documents from MongoDB to Neo4j.įigure 1: By using multiple database technologies, we can enhance our application. In this blog post, we will examine some use cases where it makes sense to use MongoDB and Neo4j together, drawing on the strengths of each database. The idea of polyglot persistence promises to allow us to take advantage of the strengths of different persistence layers to enhance functionality in our application. However, when adding new technologies to our stack we often end up with more complication in managing our systems than the benefit added by our new technologies. We want to choose the right piece of technology that offers optimal enhancement of functionality or performance boost. When building scalable applications, developers have a myriad of technologies to choose from, especially when choosing a database technology. The code is available in our GitHub project, but is no longer actively maintained. * Mongo University, free graded courses covering various aspects of MongoDB from development to administrative activities to security, etc., offers a solid path to learning.This Neo4j Lab has been deprecated. ![]() * MongoDB driver support is available for a variety of languages. ![]() * MongoDB's approach to scalability - using replica sets for high availability and fault-tolerant failover and sharding databases over a potentially large number of servers - makes it easy to scale huge amounts of data without overly expensive hardware and failover complexity. Add to that multikey indexes (indexes over array fields), string and geolocation indexes, and indexes where entries expire documents with time. Simple and compound indexes, as found in the relational database world, are just the start. * MongoDB's indexes provide amazing performance even in a schemaless world. This allows for a lot of flexibility and makes it easy to upgrade or refactor existing software. * MongoDB's schemaless document-centric approach to database makes it easy to store any kind of data I need to, even subdocuments and array fields with minimal fuss within code or tools. I don't usually rave about products, but I do about MongoDB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |