Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well, you haven't said <em>which</em> NoSQL engine you're going to, which is pretty important. Most NoSQL data stores don't support the concept of a composite primary key - and some of them won't allow you unique columns in the first place.</p> <p>First, note that I work for a NoSQL vendor, <a href="http://gigaspaces.com/" rel="nofollow">http://gigaspaces.com/</a> - I'm not unbiased.</p> <p>However, going from JPA to NoSQL is not hard, no matter what your engine is. For GigaSpaces, you can use JPA to talk to the data grid with very few changes, for example, although then you're still stuck with JPA.</p> <p>To really think about JPA, you need to think about your data as <em>data</em> and not organizational stuff; you have a triplet, basically, which means your NoSQL data items consist of three data items (predicate, subject, object, like you've used.) For most NoSQL engines you'll probably want an id there, too, just for efficiency's sake.</p> <p>The ID is the "primary key," and enforcing unique triplets after that is going to be on <em>your</em> end more than the NoSQL engine's end; this is one area where NoSQL "suffers" compared to SQL, but it's also where you find the greatest speed and storage improvements.</p> <p>For some NoSQL engines, then, you'll build a document, consisting of the three data items, and you'd just query for that document before writing it into the database.</p> <p>I could give you an example for many NoSQL engines (and certainly can for GigaSpaces) but I don't know which one you're targeting or why.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload