database design question here.
Say we had a webapp or something that uses hashtags for 20-40 word notes. What is the best way to store a user's hashtags.
For instance, if a user entered. "I like to have #lunch at #sizzler"
we would store the sentence as text and we could store the hashtags as JSON, a comma separated list or some other mechanism.
Its also worth pointing out that the tags need to be searchable, such as how many people have been hash tagging lunch, etc.
Advise on the matter would be great, I always get a bit stumped when it comes to storing variable sized inputs in mysql. There can be an infinite number of hashtags per note, what is the best way to store them?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…