在MySQL数据库中对表进行分组 [英] Grouping tables within a MySQL database

查看:769
本文介绍了在MySQL数据库中对表进行分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的思考: 我有一些表示数据库中数千个表的ER图.多个文件中的每个文件中表示的实体都具有设计者决定的某种关联关系.尽管其他文件中的实体之间存在关系,但它们之间没有映射.这似乎是绘制这种大小的数据库的惯例.

Here's my ponder: I've got some ER diagrams representing several thousand tables in a database. The entities represented in each of the multiple files have some associative relationship as decided by the designer. While relationships exist between entities in other files, they are not mapped. This seems common practice for diagramming databases of this size.

我很乐意在MySQL数据库中表示这些分组.由于SCHEMA是MySQL中DATABASE的别名,因此我找不到用于对数据库中的表进行分组的机制.

I was entertaining the idea of representing these groupings in a MySQL database. As SCHEMA is an alias to DATABASE in MySQL, I'm not able to find a mechanism for grouping tables within a database.

我想知道是否还有其他人想出一些创意分组概念,希望与我分享.或者,更好的是,如果MySQL支持某种用于对数据库中的表进行分组的机制,请告诉我. (我在研究中显然错过了它)

I'm wondering if anyone else has devised some creative grouping concept that they would like to share with me. Or, better yet, if MySQL supports some mechanism for grouping tables within a database, please let me know. ( I've apparently missed it in my research )

推荐答案

您可以为要使用的表使用相同的前缀,例如,您拥有将表emp_main和emp_Children和emp_tasks组成的雇员组,则可以像您出售的商品之类的另一组商品都以它开头_

You can use the same prefix for the tables you want to use, for example you have employees groups you make the tables emp_main and emp_Children and emp_tasks then you can have another group like items that you sell that starts all with it_

这篇关于在MySQL数据库中对表进行分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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