Denormalized data modeling with Siena

146 Views Asked by At

I am trying to create a simple app on GAE/J. The data model consists of a list of notes, each with a few tags.

In the relational world, this would be a many-to-many - since each note can have several tags, and every tag can "belong" to several notes. However, this doesn't fit GAE datastore environment very well. So, I'm considering saving with each note, its list of tags as well. If indexed properly, searching by tag should be quick too.

My question: How to model this using Siena? Documentation is sparse and I saw the examples, but got confused.

1

There are 1 best solutions below

6
mandubian On BEST ANSWER

Siena doc is sparsed as I don't have time to work on it anymore... I'm busy on other projects and if anyone wants to contribute and maintain Siena, he/she's welcome ;)

Considering your question, yes you should use a simple List (aka properties list) which is managed by Siena and works in GAE.

Add a field such as : (no annotation)

List<String> tags

It should work!