在网络开发中,什么是“术语”、“分类术语”?和“词汇”?

发布于 2024-10-17 05:29:36 字数 377 浏览 4 评论 0原文

我需要有目的地再创建 2 个表:一个表将存储标签和类别数据(类别可以有层次结构,但标签没有),另一个表存储标签、类别和内容之间的关系。但我对那两张表的名称很困惑。我确实是网络开发的新手。经过一番谷歌搜索后,我发现了一些单词,如术语、分类术语和来自 drupal 和 wordpress 的词汇。但我不知道它们的意思。您能解释一下这些词并帮我为我的两张表命名吗?当然,如果这些表格不适合我的目的,也请指导我。

content{
    content_id
    ...
}

table_A{
    type (tag, category, ...)
    name
    parent_id
}

table_B{
    table_A_id
    content_id
}

I need to create 2 more tables with purpose: one table will store tags and categories data (categories can have a hierarchy but tags are not) and another table store relationship between tag, category and content. But I so confused about name of those 2 tables. I'm really a newbie in web development. After googling a bit, I found some words like term, taxonomy terms and vocabulary from drupal and wordpress. But I have no idea what they mean. Can you explain those words and help me give a name for my two tables. Of course if those tables are not well design for my purpose please guide me too.

content{
    content_id
    ...
}

table_A{
    type (tag, category, ...)
    name
    parent_id
}

table_B{
    table_A_id
    content_id
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鸠书 2024-10-24 05:29:36

与wordpress相关,这些词确实令人困惑。如果您使用 WordPress 构建网站,则无需担心用于存储分类法和术语的数据库表,因为它内置了处理所有这些问题的方法。

当您在 WordPress 管理面板中编辑页面或帖子时,您会注意到默认情况下右侧有一个框,该框自称“类别”并允许您创建新类别。创建后,您可以将帖子或页面添加到您创建的任何“类别”中。我相信你已经明白了。

随着 WordPress 版本的构建,人们开始要求对其内容进行更多的自定义控制。因此开发人员在 WordPress 中添加了“自定义分类法”。为了清楚起见,我应该提到“类别”是 WordPress 内置的默认“分类法”的名称。

分类法是一组术语。因此,当您在管理面板的右侧框中创建“类别”(例如“新闻”)时,您正在创建一个名为“新闻”属于“类别”分类法。

这允许开发人员定义自己的分类法(比方说“产品”)并将其与页面、帖子或任何其他“帖子类型”相关联。因此,如果它与管理面板中的普通“帖子”相关联。编辑后会出现一个与现有“类别”框完全相同的框,但会称自己为“产品”。添加到该列表中的任何内容都将是“产品”分类下的术语。

希望这能澄清一些使用 WordPress 的事情。这些术语在不同的上下文中可以有不同的使用方式,因此我所说的任何内容都不一定适用于 wordpress 包之外的任何内容。不幸的是,对于您可能在讨论中看到的给定单词,通常没有通用的“Web 开发”含义。

With relevance to wordpress, those words are indeed confusing. If you are using wordpress to build a site, you shouldn't need to worry about the database tables for storing taxonomies and terms as it has built in methods to handle all that.

You'll notice when you're in the wordpress admin panel editing a page or post that there is by default a box on the right which calls itself "Categories" and allows you to create new categories. Once one is created, you can add your posts or pages to any "Categories" you've created. I'm sure you understand that already.

As wordpress releases were built, people started asking for more customizing control over categorizing their content. So developers added "custom taxonomies" to wordpress. For clarity, I should mention that "Categories" is the name of a default "Taxonomy" built into wordpress.

A taxonomy is a group of terms. So when you create a "Category" in the right hand box of the admin panel (say "news" for example), you are creating a "term" named "news" which belongs to the "Categories" taxonomy.

This allows a developer to define their own taxonomy (let's say "products") and associate it with pages, posts or any other "post type". So if it's associated with just plain regular "posts" in the admin panel. A box exactly like the existing "categories" box would show up upoon editing but would call itself "products" instead. Anything added to that list would be a term under the "products" taxonomy.

Hope this clarifies things a bit for using wordpress. These terms can be used differently in different contexts so nothing I've said necessarily applies to anything outside of the wordpress package. Unfortunately there is often no universal "web development" meaning for a given word you may see thrown around in discussion.

看海 2024-10-24 05:29:36

上次所说的分类学,就是对生命有机体进行分类。同样,在计算机工程中,分类法意味着对术语进行分类,可以是实词(三、车、猫),动词(go、be、do)。分类法和术语可以是任何东西,但概念是数据结构和层次结构

Taxonomy, last time ago, means categorize life organisms. Similarly, in computer engineering, taxonomy means categorize terms, can be substantive(three, car, cat), verbs(go, be, do). Taxonomy and terms can be mens anything, but the concept is a data structure and hierarchy

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文