大多数数据表通过一个字段链接到了一个或多个数据表,这个字段一般是这个数据表的唯一数据,熟悉数据库的人肯定知道,这个数据就是 ID,如某个文章的 post_id,这些链接关系如下表:
| 数据表 | 存储的数据 | 关联到 |
|---|---|---|
| wp_posts | 文章、页面、附件、版本、导航菜单项目 |
wp_postmeta (通过post_id关联) wp_term_relationships(通过post_id关联) |
| wp_postmeta | 每个文章的元数据 | wp_posts (通过 post_id关联) |
| wp_comments | 评论 | wp_posts (通过 post_id 关联) |
| wp_commentmeta | 评论元数据 | wp_comments (通过comment_id 关联) |
| wp_term_relationships | 文章和自定义分类法之间的关系 |
wp_posts (通过 post_id 关联) wp_term_taxonomy (通过term_taxonomy_id 关联) |
| wp_term_taxonomy | 自定义分类法(包括默认的分类目录和标签) | wp_term_relationships(通过 term_taxonomy_id关联) |
| wp_terms | 关联到分类法中的分类目录,标签和自定义分类项目 | wp_term_taxonomy (通过term_id 关联) |
| wp_links | 博客连接(已弃用,可以不用考虑) | wp_term_relationships(通过 link_id 关联) |
| wp_users | 用户 | wp_posts (通过post_author 关联) |
| wp_user_meta | 每个用户的元数据 | wp_users (通过 user_id 关联) |
| wp_options | 网站设置和选项 (通过 WordPress 后台、主题、或插件设置) | 独立的,不与其他任何数据表关联 |
开始之前,有一些需要注意的事项需要告诉大家。
了解了 WordPress 内容结构和数据表,现在是把他们对应起来的时候了下,表显示了每个数据表被用来存储哪种类型的内容。
| 内容类型 | 数据表 |
|---|---|
| 文章 | wp_posts |
| 页面 | wp_posts |
| 自定义文章类型 | wp_posts |
| 附件 | wp_posts |
| 链接 | wp_links |
| 导航菜单 | wp_posts |
| 分类目录 | wp_terms |
| 标签 | wp_terms |
| 自定义分类法 | wp_term_taxonomy |
| 分类项目 | wp_terms |
| 文章元数据 | wp_post_meta |
| 小工具 | wp_options |
| 设置选项 | wp_options |
| 用户 | wp_users |
| 文章正文 |
wp_posts (如果添加了文章) wp_options (如果添加了小工具) 主题和插件文件 (硬编码的) |
| 其他内容 |
wp_posts (如果添加了文章) wp_options (如果添加了小工具) 主题和插件文件 (硬编码的) |
你可能会注意到并不是所有的数据表都在上表中出现了,在这些没有出现的数据中,并不存储实际的数据,而是作为辅助性的数据表,存储着一些关于这些数据的关系。
zaishiyixia
Muchas gracias. ?Como puedo iniciar sesion?
Some really interesting information, well written and broadly user genial.
https://www.droversointeru.com
“This is a topic close to my heart cheers, where are your contact details though?”
I really appreciate this post. I¦ve been looking everywhere for this! Thank goodness I found it on Bing. You’ve made my day! Thank you again
https://nflbox.me/nfl-2024-streams
I keep listening to the news update lecture about receiving free online grant applications so I have been looking around for the best site to get one. Could you advise me please, where could i get some?
https://www.droversointeru.com
iofn19
Someone essentially lend a hand to make critically posts I might state. That is the very first time I frequented your website page and up to now? I amazed with the analysis you made to create this particular submit incredible. Fantastic task!
hq11qi
aazb65
w5dz6p
wo02af
ywri3c
7m3v35
w23xv7
3lxnqv
bjwtgy
w7iskb
lwd2st
d9jif0
Nhà Cái xn88 có uy tín không sở hữu số lượng thành viên tham gia siêu khủng bởi hệ thống vận hành chuyên nghiệp, mang lại cơ hội khám phá sản phẩm đặc sắc đa dạng trên thị trường. Thương hiệu cung cấp các sảnh cược nổi tiếng như: Bắn Cá, Casino Trực Tuyến, Thể Thao, Đá Gà, Nổ Hũ
Thông qua hệ thống tường lửa WAF 5 lớp và công nghệ mã xác thực 2AF, nhà cái 66b ẩn danh tuyệt đối mọi tài khoản người chơi đồng thời, mã hóa toàn bộ hoạt động khi hội viên truy cập, sử dụng dịch vụ, sản phẩm. Vì thế, bạn hoàn toàn có thể yên tâm khi cá cược tại đây.
shishi