Reputation: 2346
I am interested in the underlying data structure of the database and the way stackoverflow manages tags. I am about to build application that will rely entirely on tag based filters and I seek for the right approach. What is the best way to design the database, so a minimum queries will have to run in future when working with the sets of tags to filter my data. I did use the search, but couldn't find what I am looking for.
Upvotes: 2
Views: 448
Reputation: 5032
I don't know if they do it well, but you may want to look at Drupal taxonomy for ideas (http://drupal.org/documentation/modules/taxonomy). If you run the installation, you can look at how they handle this in the generated db.
Upvotes: 1
Reputation: 230336
Stackoverflow does not rely entirely on SQL database to work with tags. They cache, pre-sort and pre-aggregate them aggressively.
Read this interesting story of one optimization.
From there you can get some insights on how stackoverflow works.
Upvotes: 3