Hacker News new | past | comments | ask | show | jobs | submit login

This is incredibly helpful.

However, I wish there's something in reverse: Redis as a MySQL storage engine. The most obvious useful things is that you can save a `tags` table without m2m tables, juse use Redis sets.




Why have an m2m table? Just have a table with two columns: post_id (or whatever is being tagged) and tag (varchar). If you want to present a list of possible tags just query for uniques. I may be missing something, so please correct me if there is a better way or I am misunderstanding your point.


there are three design patterns for tags in a table based db

http://forge.mysql.com/wiki/TagSchema


Link is dead... Just redirects to dev.mysql.com

Cache link, since I can't find it on dev.mysql.com:

http://webcache.googleusercontent.com/search?q=cache:II_A7LF...


I believe Postgres supports something like that.


One might choose to use the array datatype, combined with GiST, GIN, and/or expression based indexes, depending on the workload. That would be somewhat more lucid in most situations than a string packed into an attribute.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: