Answer the question
In order to leave comments, you need to log in
What database schema to choose for hashtags in total?
There is a social network, there is different content: posts on the wall, comments, videos (with descriptions), photos, messages.
For all content types, the user can write a #hashtag.
When you enter #hashtag in the search, there should be a search for all types of content.
Tell me, please, how best to organize this at the database level (we use postgresql).
As the most obvious solution:
Answer the question
In order to leave comments, you need to log in
Of course, I'm not a specialist in Postgres, as an option, you can use a json type field in a table with content for tags.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question