Mongoose vs Neo4j: What are the differences?
Mongoose: MongoDB object modeling designed to work in an asynchronous environment. Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box; Neo4j: The world’s leading Graph Database. Neo4j stores data in nodes connected by directed, typed relationships with properties on both, also known as a Property Graph. It is a high performance graph store with all the features expected of a mature and robust database, like a friendly query language and ACID transactions.
Mongoose and Neo4j are primarily classified as "Object Document Mapper (ODM)" and "Graph Databases" tools respectively.
"Well documented" is the primary reason why developers consider Mongoose over the competitors, whereas "Cypher – graph query language" was stated as the key factor in picking Neo4j.
Mongoose and Neo4j are both open source tools. It seems that Mongoose with 19K GitHub stars and 2.63K forks on GitHub has more adoption than Neo4j with 6.61K GitHub stars and 1.63K GitHub forks.
According to the StackShare community, Mongoose has a broader approval, being mentioned in 88 company stacks & 92 developers stacks; compared to Neo4j, which is listed in 114 company stacks and 47 developer stacks.
What is Mongoose?
What is Neo4j?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
I inherited a stack where Mongoose is used in the database layer.
It's been several months and it's still the single highest source of daily WT*s in my backend development. The API is full of irregularities and the design is a poor mix of object-orientation and stateful objects with a lot implicit behavior. Mongoose made the choices of taking the worst parts of ORMs and using them in a context where the benefits of ORMs don't apply. The only reason I'm keeping it is its handy
.populate() feature. Expect bad surprises!
Neo4j is a great graph database, but it's also a great tool for any application in general. The data model is easy to figure out and is flexible to use as your application changes in the early stages. Further, there are constraints you can add to get data consistency once you have a firm data model. The built in admin tool makes it easy to review the data, see how your application is being used, and has a great query plan visualizer for when you want to optimize for performance.
To be evaluated
- + Leading Graph DB provider, large community
- + Rich querying language
- + Tools to visualise and interact visually with results
Possible alternative to triple store.
- does it support full text search?
- does it support some sort of inference or derived relationships (e.g. transitivity, symmetry)?