【发布时间】:2010-03-26 02:55:57
【问题描述】:
我是 PostgreSQL 架构概念的新手。
对于上述场景,我想知道
- 我们为什么不使用单个数据库(使用名为 public 的默认架构)
- 为什么我们没有一个表来存储多个用户行?
- 保存用户相关信息的其他表,外键指向用户表。
谁能给我一个真实的案例场景,哪个单库多模式会非常有用,是常规单库单模式解决不了的。
【问题讨论】:
标签: database-design postgresql
我是 PostgreSQL 架构概念的新手。
对于上述场景,我想知道
谁能给我一个真实的案例场景,哪个单库多模式会非常有用,是常规单库单模式解决不了的。
【问题讨论】:
标签: database-design postgresql
来自http://www.postgresql.org/docs/8.4/interactive/ddl-schemas.html
人们可能想要使用模式有几个原因:
*To allow many users to use one database without interfering with each other.
*To organize database objects into logical groups to make them more manageable.
*Third-party applications can be put into separate schemas so they do not collide with the names of other objects.
架构类似于操作系统级别的目录,但架构不能嵌套。
【讨论】: