I have a PostgreSQL database whose tables are divided amongst a number of schemas. Each schema has a different set of access controls; for example, one schema might be read-only to regular users, while they are allowed to create tables on another. Schemas also act as namespaces, so users don't have to worry about duplicating existing tables when they create new ones.
我有一个PostgreSQL数据库,其表格分为多个模式。每个模式都有一组不同的访问控制;例如,一个模式可能只对普通用户是只读的,而允许它们在另一个模式上创建表。模式也充当命名空间,因此用户在创建新表时不必担心重复现有表。
I want to create a similar setup using MySQL. Does it have an equivalent concept? If not, how can I most closely simulate it? I would prefer not to use multiple databases.
我想用MySQL创建一个类似的设置。它有相同的概念吗?如果没有,我怎样才能最接近地模拟它呢?我宁愿不使用多个数据库。
2 个解决方案
#2
7
Prefixing table names is what's done with most MySQL-driven apps.
前缀表名是大多数MySQL驱动的应用程序所做的。
#1
#2
7
Prefixing table names is what's done with most MySQL-driven apps.
前缀表名是大多数MySQL驱动的应用程序所做的。