[OT] large db question about no joins

Martin P. Hellwig martin.hellwig at dcuktec.org
Fri Apr 17 11:42:25 CEST 2009

Daniel Fetchinson wrote:
> Well, I gave the concrete example of zoo/cage/animal/leg because this
> *is* the business logic. I need to know for example the total number
> of animals, this is pretty understandable if you have a zoo. Or you
> mean that I should give another example?

It might be the business logic but not the process. 

>> Using the business process I could probably
>> narrow down the scope quite a bit like, 
> No, I'd like to have the exact number at any given time.
Fair enough, but this is then the *exact* scope you like to answer me in.
> Let's say I need to implement this on the google app engine, so I
> can't make too many choices on my own. On the GAE, how would I do
> this?
All other data modeling (e.g. EAV, relational, object orientated) will 
result in a structure requiring extra calculation when doing the query 
(and thus according your requirement isn't acceptable).

So I need to store the data in such a way that it is accessible before 
the query with the minimal amount of processing.

Thus the only thing left is writing a subroutine in my code which 
recalculates the amount of legs when there is a change in it and store 
it just as a pair value:
amount_of_legs = Positive Integer

The thing with bogus requirements for an imaginary example is that the 
solution is imaginary bogus too, leaving little room for applicability 
in the real world.


More information about the Python-list mailing list