Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-21 Thread David Harkness
On Fri, Jan 21, 2011 at 4:44 AM, Dotan Cohen wrote: > Then I would have to check what values are available when inserting, > and possibly normalise every so often. I'll think about that, and when > I have enough data in the database I'll set up a test system to play > with the possibility. > Yes

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Harkness
On Thu, Jan 20, 2011 at 12:21 PM, Dotan Cohen wrote: > I understood that. My concern is exactly with adding new nodes. There > is no incrementor (++i) in SQL, so knowingly coding a solution that > will require incrementing two fields in half the database rows seems > irresponsible. > It only req

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Harkness
On Thu, Jan 20, 2011 at 7:00 AM, Richard Quadling wrote: > I'd recommend using a nested set approach for the tags > (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html > gives a good explanation on the issues and methodology of nested > sets). > Thanks for the link. That article

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Harkness
I cannot agree more with the others about using a join table. While it's tempting to go with your first solution due to fear of performance issues, you can usually address performance issues with a technical solution. Addressing problems that arise from a constraining design choice is much more dif