Home > Uncategorized > Working with MongoDB using Kundera

Working with MongoDB using Kundera

Recipes for Geeks

Kundera – a JPA 2.0 (Java Persistence API) based ORM library was originally developed for Cassandra database. A support for Hbase was later added to it.

Those who are new to Kundera, should read this to get a basic idea. For impatient ones – Get started with Kundera in 5 minutes!

Kundera now supports MongoDB – a document-oriented database. Some salient features of MongoDB datamodel are:

  1. Documents are stored as “collections” in DBs.
  2. A document can be embedded into other document, and hence no join is needed for retrieving data. This makes database operations fast.
  3. Drivers are available for most of the popular programming languages.

Our Data Model

In this tutorial, we’ll use below EMAIL and ATTCHMENT entities as our data model and perform CRUD operations using Kundera.
Data Model
Our entities in JSON notation:

{

EMAIL: { “MESSAGE_ID” : “1″, “SUBJECT” : “Please Join Meeting”, “BODY” : “Agenda: RFP discussion”…

View original post 536 more words

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: