1.1. Logical Structure of Database Cluster
Figure 1.1 shows the logical structure of a database cluster. A database is a collection of database objects. In the relational database theory, a database object is a data structure used either to store or to reference data. A (heap) table is a typical example of it, and there are many more like an index, a sequence, a view, a function and so on. In PostgreSQL, databases themselves are also database objects and are logically separated from each other. All other database objects (e.g., tables, indexes, etc) belong to their respective databases.
图1.1 展示了数据库的逻辑结构。 数据库中包含了表、索引、视图、函数、序列等。 在数据库集群中每个数据库是相互独立的。
All the database objects in PostgreSQL are internally managed by respective object identifiers (OIDs), which are unsigned 4-byte integers. The relations between database objects and the respective OIDs are stored in appropriate
system catalogs, depending on the type of objects. For example, OIDs of databases and heap tables are stored in pg_database and pg_class respectively, so you can find out the OIDs you want to know by issuing the queries such as the following:
PostgreSQL 数据库中的所有对象都有自己的Object ID(OID)。 这些对象的object id 都存储在system catalogs中。例如:数据库和表的oids 分别记录在pg_database, pg_class中。 可以通过下列命令进行查询:
参考文档:
http://www.interdb.jp/pg/pgsql01.html
