0

I am new to both Scala and NoSQL databases. I would like to know is if there exist ORM tools that will map my Scala objects to a NoSQL database, as with RDBMS solutions?

John Powell
  • 12,253
  • 6
  • 59
  • 67
Omid
  • 1,959
  • 25
  • 42

1 Answers1

1

There is a library called Kundera, based on JPA, that provides ORM for a number of NoSQL databases of different flavours, including HBase, Cassandra, MongoDB, CouchDB and Neo4J. See https://github.com/impetus-opensource/Kundera which appears to be under active development. Note that the nature of some of the problems that have given rise to NoSQL in the first place, and some of the tradeoffs inherent in the CAP theorem between availability, consistency and partition tolerance, make ORM challenging in a NoSQL environment. There is some good discussion of some of these issues here: http://architects.dzone.com/articles/sqlifying-nosql-%E2%80%93-are-orm

As you mentioned Scala, specifically, here is a very interesting article from Foursquare about how they built DSL with Scala for interacting with MongoDB. http://engineering.foursquare.com/2011/01/21/rogue-a-type-safe-scala-dsl-for-querying-mongodb/

John Powell
  • 12,253
  • 6
  • 59
  • 67
  • Thanks, it was really helpful, is there any tutorial that goes over the these technologies and compare them? – Omid May 25 '14 at 18:34
  • @Omid, there is a nice book called Seven Databases in Seven Weeks that goes into some detail about some of the different flavours of NoSQL databases -- graph, document, key/value, etc, http://pragprog.com/book/rwdata/seven-databases-in-seven-weeks. I am sure there are many other sources. At this point choosing the right storage solution for your application is probably more important than worrying about an ORM side of things. – John Powell May 25 '14 at 18:43
  • My problem in choosing storage solution is I want kind of storage that the has a API which I can use it very easy, I don't want to do lots of query to get data. Basically I want use my data in natural way instead of always have a handler for each element. My data is VERY unstructured so it really maps to some objects in my source code, that was why I though ORM kinda looking is useful. – Omid May 25 '14 at 20:09