In NoSQL, you don't have join as you said.
In NoSQL, managing data is more direct than RDBMS but when you want to merge
data from different tables, you need to do it yourself in your app. In a
summary, for relations, you do the job of the DB. So, this might seem a
drawback but it's also a big advantage because you control everything. It
also allows scalability and distribution!

Therefore, you must design your data to allow the kind of request your need
in your app. You don't design a perfect normalized model but an efficient
one. Generally, this is the kind of job designers have to do with their
RDBMS models when they discover their perfect relational normalized models
are not very efficient in production. So in NoSQL, you are forced to think
like that immediately. I know, it has pros and cons ;)

Anyway, in NoSQL, denormalizing is not necessarily bad and redundancy is
also advised in lots of cases. Moreover, using a memory cache is a good
solution in many cases in which you won't query the datastore but get the
data from your cache. Finally, learn the behavior of GAE datastore for
indexing/filtering/ordering to build the right model.

Sorry if my advises are quite generic :p

regards
Pascal

On Sun, Aug 14, 2011 at 4:28 PM, MK Z <v5s12.msc...@gmail.com> wrote:

> Thanks for all the replies,
> just a quick question. Since BigTable is object database so why bother
> having relationship between entities? I know there are advantages to that.
> But for small application like school project, I think I dont really need to
> have all those relationship annotations in relevant data model. I mean you
> can simply "join" the query result from the app context? For example if I
> have forum board containing few fields including forum category (e.g
> Science, Tech, etc) and forum group (adult/teen/kids). In RDBMS, forum
> category id and forum group id will be stored in Forum table as foreign key
> which make them related. but for BigTable, the only way to relate them is
> using the mappedBy annotation or embedded class(not really a relationship).
>
> Im thinking not to have the relationship set in the relevant class and
> simply tie everything at app level. for example after querying the forum
> object, it will list and display all forum topics according to category and
> group. Since forumcategoryid and forumgroupid are stored as Long type in
> forum object, displaying series of number is meaningless. so basically I can
> create a function that will query this id to respective objects and return
> the forum category description based on ID supplied. Any advice?
>
> btw, ive gone through the links u given, but there isnt enough app-like
> example on one-to-many relationship (only the simple  guestbook example)
>
> On Tue, Jul 26, 2011 at 8:21 PM, Jose Montes de Oca <
> jfmontesde...@google.com> wrote:
>
>> Hi,
>>
>> You don't need to worry much on the underlying of the datastore (big
>> table) but rather understand how the datastore works as a non relational way
>> of persisting data in your application. If you are using Java you have:
>>
>> - JPO: http://code.google.com/appengine/docs/java/datastore/jdo/
>> - JPA: http://code.google.com/appengine/docs/java/datastore/jpa/
>>
>> There are also other frameworks that you can check out:
>> - Objectify: http://code.google.com/p/objectify-appengine/
>> - slim3: http://code.google.com/p/slim3/
>> - Twig: http://code.google.com/p/twig-persist/
>>
>> I will recommend to start by reading about the Datastore:
>> http://code.google.com/appengine/docs/java/datastore/overview.html getting
>> familiar with its concept (keys, properties, entities, ancestors ...)
>>
>> Another good resource of information would be Past Google IO talks:
>> - http://www.youtube.com/watch?v=2jW2iSKDipY
>>
>> For the scenario you picture on your example, you are right you can not do
>> join queries. A workaround would be to de-normalize your data model to have
>> the department information within the employee entity, so you could make a
>> query over the kind employee.
>>
>> Hope this helps you getting started on Datastore and App engine. If you
>> have more questions don't hesitate to ask!
>>
>> Happy coding!
>>
>> Best,
>> Jose Montes de Oca
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-appengine/-/-MPXy0Q40QsJ.
>>
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to