Re: [web2py] Multiple level database diagram
it's a classic problem of the tradeoff between database normalization and speed. the decisions are guided by the amount of traffic and the type of database you are using. for example if you are using google app engine, where you cannot do joins, i would say 1 table that is completely denormalized. for a traditional SQL style database it depends on the joins and indexes you would need. if you have to join all 6 tables in on each query then it's probably not a great design from a query efficiency standpoint (but would take the least space to store since no data is duplicated). cfh On Monday, June 11, 2012 7:46:35 AM UTC-7, Hassan Alnatour wrote: I think some simple queries nothing complex , i will just sort every level by its parent .
Re: [web2py] Multiple level database diagram
What kind of queries are you planning to run on this data? Your answer will help us decide whether this is better to have in few or many tables. Also of relevance are the normal forms (http://en.wikipedia.org/wiki/Database_normalization) On Tue, Jun 12, 2012 at 12:39 AM, Hassan Alnatour halna...@gardeniatelco.com wrote: Dear ALL , I am creating an application with is a reference about some city's , so the website has some city's , every city has some areas and every area has some other stuff ,it all up to 6 levels , so what is the best was to do that in the database ? i am thinking about making every level as a separate table.. Best Regards,
Re: [web2py] Multiple level database diagram
I think some simple queries nothing complex , i will just sort every level by its parent .