-
Notifications
You must be signed in to change notification settings - Fork 233
Object to NoSQl Data mapping
Different NoSQL datastores have different ways of storing data which may be in form of key-value pairs, columnfamilies, document objects or graphs. The main purpose of storing data in any of these datastores is to achieve simplicity in design, better performance and scalability. But in order to manipulate data stored in "NoSQL" fashion and leverage its benefits there has to be a solution which allows you to interact with that data in familiar way as was done with traditional databases. Kundera enables you to play with data stored in NoSQL databases in same old way by using specifications of JPA and thus enabling you to use the features of these datastores with minimal learning.
Kundera is a ORM tool for NoSQL databases. It is a JPA compliant object mapping solution for several NoSQL databases. Objects in Kundera are maintained in form of Entities and are recognized via JPA annotations.
Kundera maps data in Cassandra or any other datastore seamlessly.
- Cassandra Keyspace can be specified in persistence.xml as
<property name="kundera.keyspace" value="KunderaExamples"/>
- As per JPA specifications, Entity maps to a table and its attributes to columns.
e.g.
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
public class User
{
@Id
private String userId;
@Column(name="first_name")
private String firstName;
@Column(name="last_name")
private String lastName;
}
Equivalent in Cassandra :
CREATE TABLE "User" (
key text PRIMARY KEY,
first_name text,
last_name text
) ;
Kundera facilitates using key features of Cassandra with utmost ease. A brief explanation for the same can be found at the respective links below:
As a JPA solution, Kundera maps each associated entity in JPA way, (e.g., each associated entity in separate table). However keeping recent development around Cassandra,MongoDB etc in mind,Kundera team is analyzing and working on alternative path on dealing with association handling.
Under the hood
When you call persist on an object :
em.persist(object);
You may refer architecture of Kundera for further details.
-
Datastores Supported
- Releases
-
Architecture
-
Concepts
-
Getting Started in 5 minutes
-
Features
- Object Mapper
- Polyglot Persistence
- Queries Support
- JPQL (JPA Query Language)
- Native Queries
- Batch insert update
- Schema Generation
- Primary Key Auto generation
- Transaction Management
- REST Based Access
- Geospatial Persistence and Queries
- Graph Database Support
-
Composite Keys
-
No hard annotation for schema
-
Support for Mapped superclass
-
Object to NoSQL Data Mapping
-
Cassandra's User Defined Types and Indexes on Collections
-
Support for aggregation
- Scalar Queries over Cassandra
- Connection pooling using Kundera Cassandra
- Configuration
-
Kundera with Couchdb
-
Kundera with Elasticsearch
-
Kundera with HBase
-
Kundera with Kudu
-
Kundera with RethinkDB
-
Kundera with MongoDB
-
Kundera with OracleNoSQL
-
Kundera with Redis
-
Kundera with Spark
-
Extend Kundera
- Sample Codes and Examples
-
Blogs and Articles
-
Tutorials
* Kundera with Openshift
* Kundera with Play Framework
* Kundera with GWT
* Kundera with JBoss
* Kundera with Spring
-
Performance
-
Troubleshooting
-
FAQ
- Production deployments
- Feedback