Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What the overhead of Java ORM for MongoDB

What is the overhead of using Java ORM for MongoDB, or its better that we go the at basic driver level to read or write?

We will be adding Mongo DB for one of our requirements.

There are couple of java ORM mapping tools for java
-morphia
-spring-data
-others

Morphia last version was released more than a year ago
but Spring data is actively maintained. Which one should be used if I am about to start now,

like image 772
maaz Avatar asked May 15 '12 11:05

maaz


People also ask

Should we use ORM with MongoDB?

Support for MongoDB has been one of the most requested features since the initial release of the Prisma ORM. Using both technologies together makes developers more productive and allows them to ship more ambitious software faster.

Which ORM for MongoDB?

The PyMongo MongoDB ORM for Python is a native and highly popular Python driver for MongoDB. It supports MongoDB versions MongoDB 2.6, 3.0, 3.2, 3.4, 3.6, 4.0, 4.2, 4.4, and 5.0. The package is essentially built to provide Python developers with all the right tools to interact with a MongoDB database.

What ORM to use in Java?

Hibernate is a Java persistence framework that simplifies the development of Java application to interact with the database. It is an open source, widely used, lightweight, ORM tool.

What is Morphia MongoDB?

Morphia is a wrapper around the Java driver for MongoDB. It acts as an ODM (Object Document Model) for MongoDB documents. Its original goal was to provide an easy mapping to POJO (Plain Old Java Objects). Nowadays, newer versions of the Java driver support this mapping out of the box.


1 Answers

Using ORM decreases the performance but it speed up the development. There is a trade off here.

For ORM tools, Morphia is most stable one. Here you can find the comparison between the Morphia and Basic Mongo Driver by their performance.

like image 150
Parvin Gasimzade Avatar answered Sep 25 '22 12:09

Parvin Gasimzade