On Tue, Apr 17, 2012 at 5:37 PM, Martijn Hoekstra <[email protected]> wrote: > On Tue, Apr 17, 2012 at 10:51 PM, Krinkle <[email protected]> wrote: >> On Apr 17, 2012, at 9:05 AM, Thomas Gries wrote: >> >>> Hi, >>> >>> for example, the extension AJAXPoll adds and uses two new database >>> tables to a MediaWiki installation. >>> This specific extension could be rewritten to use only one new table. >>> >>> My questions: >>> 1. Is there a policy, convention, that more than one new table should be >>> avoided in extensions ? >>> 2. Are two or more new tables tolerated? >> >> If it it required, then sure it's tolerated. Some of the extensions currently >> deployed on Wikipedia have lots more tables even. >> >> Of course it goes without saying, that if you can optimize the number of >> tables >> without sacrificing performance, then by all means: Go for it. >> >> If you could merge the tables and make it still perform well with the right >> database indexes, why not :) >> >> On the other hand, if it means the table will be significantly larger, then >> it >> may be better to keep them separate. For example, I'd say it's better two >> tables >> (say, 'group' and 'item', where item.it_group refers to group.gr_id). So that >> you don't have to repeat all information about the group in each item-row, >> and >> if the group has to change, no need to change all item-rows. >> >> -- Krinkle >> > > Am I reading this right as suggesting and encouragement of database > denormalisation in extensions? >
You're right, I was thinking the same thing. I don't know why we'd suggest such a thing :) -Chad _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
