赞
踩
PostgreSQL的文档中对于schema的描述:
There are several reasons why one might want to use schemas: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.
Schemas are analogous to directories at the operating system level, except that schemas cannot be nested.
主要说了下应用场景,直接看最后一句就行了:就跟系统里的文件夹一样,用来组织复杂结构的(但不能多次嵌套)
作为一个初学者,把所有的“表”都放在“桌面”上最醒目的位置(数据库“根目录”),显然没有任何毛病,别人也不会说你什么
至于catalog:
The system catalogs are the place where a relational database management system stores schema metadata, such as information about tables and columns, and internal bookkeeping information.
就是个总表嘛,什么tables,columns之类信息,包括前面说的schema全在这里,sqlite里叫sqlite_master,如果说数据库是用来存储数据的,catalog就是用来存放数据库的
还有,不要用mysql举例!不要用过时的技术解释现今的问题
我一学交互设计的竟然跑来回答后端的问题,这个世界真的太糟糕了(我太开心了)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。