Michal Čihař a écrit :
Hi
Dne Thu, 04 Jun 2009 19:25:40 -0400 Marc Delisle marc@infomarc.info napsal(a):
Zeeshan is proposing a new table to store user preferences: http://zixan.info/2009/06/04/gsoc-week-two-progress/#comments
Michal answers in the blog that this does not scale. When looking at Zeeshan's proposal, I had the same idea for a moment. However, after some researches, I am tempted to reject Michal's proposal.
I know it's not perfect solution. But when I look at our configuration file, we have far too many options, to represent them as columns in table. Furthermore adding new option would mean to force users to upgrade the table.
Yes there are downsides for each alternative. Another downside for the EAV model is that at user login (session initialization) we need to read all the rows holding the user prefs for this user, instead of just one read if each option has its own column.
As mentionned in one of the links I gave, the EAV model also makes it difficult to code the possible choices for an option, for example into an ENUM.
About upgrading, I expect Zeeshan to implement a feature to auto-create and auto-upgrade the table (which could be extended to all of our pmadb tables).
Marc