Design for tagging system in GAE-J
- by tempy
I need a simple tagging system in GAE-J.
As I see it, the entity that is being tagged should have a collection of keys referring to the tags with which it's associated.
A tag entity should simply contain the tag string itself, and a collection of keys pointing to the entities associated with the tag.
When an entity's list of tags is altered, the system will create a new tag if the tag is unknown, and then append the entity's key to that tag's key collection. If the tag already exists, then the entity's key is simply appended to the tag's key collection.
This seems relatively straight-forward and uncontroversial to me, but I would like some feedback on this design, just to be sure.