开发者

how to store keywords/tags

开发者 https://www.devze.com 2023-03-16 01:35 出处:网络
I am building a web application where users will upload a file (XML format) with some data and some keywords/tags describing the data. This information will then be parsed and stored in MySQL database

I am building a web application where users will upload a file (XML format) with some data and some keywords/tags describing the data. This information will then be parsed and stored in MySQL database. Now i am not sure how to store these keywords/tags in the database and how to use them to retrieve appropriate data when the user enters keywords from the application frontend. I know i will have to build some kind of ranking algorithm to rank the keywords but my application is still in its initial stages, so right now I am more concerned about how to retrieve data than the efficiency/relevance of retrieved data.

Please help me or guid开发者_运维技巧e me to a resource which can help me.

Thanks!


This is quite an open question, but if you need help implementing tags, see this for some great tips: Recommended SQL database design for tags or tagging


you can store JSON array in mysql>=5.7 for tags like below :

["tag1","tag2",...]

if you use an extra table for store tags , you need to join and search for adding a new tag , its bad way when we have too many tags in database !

0

精彩评论

暂无评论...
验证码 换一张
取 消