Stephen is pretty much right..
MongoDB (and it's driver) is really a DB interface. Technically Mongo is more of a "document" management system than a database management system, but that's a different conversation.
Morphia is really a Persistence layer, for persisting Java objects into Mongo.
It really depends on what you are trying to do. If you want to store "Objects" in your MongoDB, than Morphia will make your life easy, since you can just use annotations as you define your Java objects. Want to add a new field to your object? Just add the field to your class definition and annotate it appropriately, and Morphia does all the work mapping the object in and out of Mongo.
However, sometimes you may really just want direct DB access. For example, maybe you want to generate a JSON like document that aggregates 100 different records, and then returns them in some giant JSON document (like a RSS stream, or something similar), which you are just going to return to the user (maybe as part of a REST-like interface). You don't need all the overhead of using a persistance layer (which could slow you down, and use more memory than needed).
A good rule of thumb...
If your operation requires, Get an OBJECT, and have the object DO SOME OPERATION (ex:execute a method on the object), than you probably want a PERSISTANCE layer (Morphia, Hibernate, etc).
If you want to just lookup and a JSON/BSON record and then RETURN a JSON record (maybe a REST lookup), you may just want to use the Driver directly, and avoid the overhead of allocating and freeing all those POJOS. This is especially true if you are returning a large result that iterates over a whole collection and returns lots of records in a single query.
Example: When a user executes a new transaction, you might use a Persistence layer, since that transaction might have lots of steps before it's done, and it has lots of Java methods, etc.
Later you want to return a list of every transaction a user has ever made in your system. It would be more efficient to use the Driver directly, both in terms of speed and memory (no need to instantiate a POJO for each transaction the guy ever did).
A rule of thumb...
If you need to Read a record, do something mildly complex, and then write the result, think persistance.
if you just need to Read and Write (simple GET or WRITE), than think DB layer.
--
Michael Gray
Founder
Technology Evangelist
MyPlanit.com