I'm designing a g+ application for a big international brand. the entities I need to create are pretty much in form of a graph, hence a lot of many-to-many relations (arcs) connecting nodes that can be traversed in both directions. I'm reading all the readable docs online, but I haven't found anything so far specific to ndb design best practices and guidelines. unfortunately I am under nda, and cannot reveal details of the app, but it can match almost one to one the context of scientific conferences with proceedings, authors, papers and topics.
below the list of entities envisioned so far (with context shifted to match the topics mentioned):
as you can see, I can visit and traverse the graph through any direction (or facet, from a frontend point of view):
and so on, you fill the list.
I want to make it straight and solid because it will launch with a lot of p.r. and will need to scale consistently overtime, both in content and number of users. I would like to code it from scratch hence designing my own models, restful api to read/write this data, avoiding non-rel django and keeping the presentation layer to a minimum template mechanism. I need to check with the company where I work, but we might be able to release part of the code with a decent open source license (ideally, a restful service for ndb models).
if anyone could point me towards the right direction, that would be awesome.
[edit: corrected typo related to many-to-many relations]pythongoogle-app-engineapp-engine-ndbgraph-databases
There's two ways to implement one-to-many relationships in App Engine.
Inside entity A, store a list of keys to entities B1, B2, B3. In th old DB, you'd use a ListProperty of db.Key. In ndb you'd use a KeyProperty with repeated = True.
Inside entity B1, B2, B3, store a KeyProperty to entity A.
If you use 1:
If you use 2:
after thorough research, this what found:
any other more detailed answer is welcomed