database - GAE - Java - Keyword classification of Datastore Entities -


There are 3 main types of organizations in datastore in my scenario, special users, objects and keywords. The problem is modeling relationships among those items and classifying them.

Users can create as many objects as they want and the user-object relationship can be easily applied with an anesthetic link.
I have designed inter-objects and inter-user relationships by defining the unit for any relationship. In this way, I can do all fans and fan-out and scale the relationship with the result set, so it is also time-efficient.

Now I need to classify the objects for keywords. Each object can be linked to limited things, whereas each key can not get limits.
What is the most effective way to implement them? (Time-ability (complexity, ...) and database activity)

One of the first methods can be: Give each object a list of keys:
The search result will be scale with the set , So it will not depend on the number of connections and keys.

Inter-user outlines things and key-object relationships for the inter-object case:
Search will again scale with the result set and thus does not depend on the net again Is the size.

What can I consider as a comparison criterion?

If you put a list of keywords (or their IDs) in your object unit, Costs will be included: Each keyword should write one per person, as a result of the update of the object unit and write an indexed asset per keyword.

If this happens rarely, it will be a small additional cost, and I would recommend a list approach to its simplicity. On the other hand, if the keyword is added / removed more often , Then the costs will increase rapidly.

With the keyword_object unit you avoid additional expenses for updating object entities, but you have to maintain another unit type, and your stored data will take more space (each keyword-object pair An extra key for).

I recommend going with any of these methods and later optimizing, when more data is available, unless you are unsure of getting millions of records very soon , And you already know your data access pattern.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -