了解数据库模式

发布于 2024-10-27 02:01:30 字数 454 浏览 1 评论 0原文

我使用 MySQL Workbench 对 phpbb 的数据库进行了逆向工程,以查看架构是什么样的。

嗯,它提出了大约 20 个表,这些表通过各种关系相互关联(不用担心)。还有另外50张左右的桌子,虽然没有任何关系,但独立坐着。

我关心的不是这是否真实地代表了 phpbb 使用的数据库。它确实提出了一些我无法找到答案的问题(可能是由于搜索了错误的术语)

数据库真的存在并且像这样工作吗? 如果是的话,他们叫什么?

编辑:对于每个关注 phpbb DB 的人来说,我不明白为什么你会这样,因为我说过这不是一个问题。我之所以提到它,是因为这就是我提出这些问题时所看到的。

用不同的词来尝试我的问题...

如果数据库有任意数量(例如 1/3)的表,这些表通过关系相互关联,然后其余 2/3 的表是独立的(即没有与其他表的关系)有这个名称吗?

谢谢

Using MySQL Workbench I reverse engineered phpbb's database to see what the schema would look like.

Well it came up with about 20 tables that were associated with each other through various relationships (no concern there). There are another 50 or so tables sitting independently though without any relationships.

My concern is not that this is a true representation of the database phpbb uses or not. It did bring up some questions that I couldn't find the answers for though (probably due to searching for the wrong terms)

Do databases actually exist and work like this?
If so what are they called?

EDIT: For everyone concentrating on the phpbb DB I don't understand why you are since I said that is not a concern. I only referred to it because that is what I was looking at when I came up with these questions.

To try my questions in different words...

If a DB is to have an arbitrary number (say 1/3) of tables that are associated to one another through relationships and then the remaining 2/3's of the tables are independent (i.e. no relationship to other tables) is there a name for this?

Thanks

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

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

发布评论

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

评论(2

蓝礼 2024-11-03 02:01:30

创建一个没有任何链接表的数据库/系统是非常容易的......我会这样做吗?没有,但我见过很多。

我怀疑这些表中至少有 2/3 实际上与其他表相关(在最松散的意义上),但这种关系是通过代码完成的,而不是通过数据库强制执行的。

It is perfectly easy to create a database/system without any linked tables...would I do it that way? No, but I have seen plenty.

I suspect that at least some of those 2/3 of those tables are in fact related (in the loose-est sense) to other tables, but that relationship is done through the code, not enforced through the database.

狠疯拽 2024-11-03 02:01:30

拥有不与其他表链接的表可能是合理的,但我不确定 PHPBB 数据库中的情况是否如此。

检查下面的链接以尝试记录 PHPBB 数据库结构。它包括大约 20 个表,听起来就像您看到的链接表。您能否提供您正在查看的未链接表的名称?

http://www.phpbbdoctor.com/doc_tables.php

表列表:

phpbb_auth_access

phpbb_banlist

phpbb_类别

phpbb_config

phpbb_confirm

phpbb_disallow

phpbb_论坛

phpbb_forum_prune

phpbb_groups

phpbb_posts

phpbb_posts_text

phpbb_privmsgs

phpbb_privmsgs_text

phpbb_ranks

phpbb_搜索结果

phpbb_search_wordlist

phpbb_search_wordmatch

phpbb_sessions

phpbb_smilies

phpbb_主题

phpbb_主题名称

phpbb_topics

phpbb_topics_watch

phpbb_users

phpbb_用户组

phpbb_vote_desc

phpbb_vote_结果

phpbb_vote_voters

phpbb_words

编辑 - 在回答您的问题编辑时,没有 1/3 的具体名称链接表,2/3 未链接。对于未链接的表,我能立即想到的主要场景是让审计表跟踪特定表中随时间推移发生的更改。不过,审核“未链接”表的数量会少于链接表的数量。

我们关注 PHPBB 的原因是您所展示的示例 - 它可能是您正在查看的 PHPBB 特定安装的一个怪癖,这当然不是一个正常的事情。

您可以将您的工具与另一个数据库一起使用并查看结果吗?

另外,就您运行工具的数据库而言 - 这是您的组织执行的自定义安装吗?我怀疑您可以看到的这些未链接的表是通过自定义修改添加到基本 PHPBB 安装中的,或者是可能不相关的表,因为它方便且可用而已添加到数据库中(例如博客表)。最好的办法是询问支持数据库安装的人员。就您更广泛的问题而言 - 如上所述,它不是一个特别正常的模式,但可能是插件的混合和其他事物对数据库的(错误)使用可以解释它。

Having tables that aren't linked to others can be reasonable, but I'm not sure that's the case in the PHPBB database.

Check the link below for an attempt at documenting the PHPBB database structure. It includes about 20 tables, which sounds like the linked tables you saw. Can you provide the names of the unlinked tables you're looking at?

http://www.phpbbdoctor.com/doc_tables.php

Table list:

phpbb_auth_access

phpbb_banlist

phpbb_categories

phpbb_config

phpbb_confirm

phpbb_disallow

phpbb_forums

phpbb_forum_prune

phpbb_groups

phpbb_posts

phpbb_posts_text

phpbb_privmsgs

phpbb_privmsgs_text

phpbb_ranks

phpbb_search_results

phpbb_search_wordlist

phpbb_search_wordmatch

phpbb_sessions

phpbb_smilies

phpbb_themes

phpbb_themes_name

phpbb_topics

phpbb_topics_watch

phpbb_users

phpbb_user_group

phpbb_vote_desc

phpbb_vote_results

phpbb_vote_voters

phpbb_words

EDIT - In answer to your question edit, there isn't a specific name for having 1/3 linked tables, and 2/3 unlinked. The main scenario I can think of off the top of my head for unlinked tables is having audit tables tracking the changes that occur over time in particular tables. There would be less audit 'unlinked' tables than linked though.

The reason we're focussing on PHPBB is that's the example you've shown - it may be a quirk of the particular installation of PHPBB that you're looking at, this certainly isn't a normal thing to find.

Can you use your tool with another database and see what results from that?

Also in terms of the database you have run your tool against - is that a custom installation that your organisation has performed? My suspicion is that these unlinked tables that you can see have been added by custom modifications to the base PHPBB install, or are potentially unrelated tables that have been added to the database because it was convenient and available (e.g. the blog table). Your best bet is to ask the person who supports that installation of the database. In terms of your wider question - as mentioned above, its not a particularly normal pattern, but possibly a mix of addons and (mis)use of the database by other things would explain it.

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