标签系统中标签的 ID [英] ID for tags in tag systems

查看:18
本文介绍了标签系统中标签的 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现一个类似于 StackOverflow 标签系统的标签系统.我在考虑在存储标签并与问题相关时,这种关系将直接与标签名称相关,或者最好创建一个字段 tagID 以将问题与标签链接"?看起来直接链接到标签名称更容易,但看起来不太好,主要是为什么在使用统计数据和/或标签分类(恕我直言)时很难管理这一点.另一个问题是当一个管理员决定修复"标签名称时.如果标签名称中没有标签ID,那么我将更改表的键...

I'm implementing a tag system similar to StackOverflow tag system. I was thinking about when storing the tags and relating to a question, that relationship will be directly with the tag name or it's better create a field tagID to "link" the question with the tag? Looks that linking directly to tag name is easier, but it doesn't look good, mainly why when working with statistics and/or tag categorization (IMHO) can be hard to manage this. Another problem is when one admin decides "fix" a tag name. If there isn't a tagID separated from tag name, then I will be changing the key of the table...

你有什么想法?

感谢所有回复.我将删除此帖子,因为还有其他具有相同主题的帖子.我想知道为什么搜索和建议没有为我显示结果...

Thanks for all replies. I will delete this post since there is another posts with the same subject. I wonder why the search and the suggestion doesn't show it results for me...

推荐答案

看看这些相关的早期 SO 问题:

Have a look at these related earlier SO questions:

数据库设计标记

如何设计一个数据库架构到支持标记类别

是否有理想的架构标记?

这篇关于标签系统中标签的 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆