relation表示表或索引。具体表示table还是index,需要看具体情况。
tuple:表示表中的行。
page:表示在磁盘中的数据块。
buffer:表示在内存中的数据块。
highgo=# \d
List of relations
Schema | Name | Type | Owner
----------------+----------+-------+--------
oracle_catalog | dual | view | highgo
public | a | table | highgo
public | b | table | highgo
public | bindump | table | highgo
public | blog | table | highgo
public | c | table | highgo
public | hexdump | table | highgo
public | persons | table | highgo
public | students | table | highgo
public | t | table | highgo
public | test | table | highgo
public | test01 | table | highgo
public | test_new | table | highgo
public | test_v | view | highgo
public | testa | table | highgo
public | testb | table | highgo
public | testc | table | highgo
public | testd | table | highgo
(18 rows)
highgo=# \di
List of relations
Schema | Name | Type | Owner | Table
--------+-------------+-------+--------+--------
public | t_i_2 | index | highgo | test
public | test01_pkey | index | highgo | test01
(2 rows)
tuple:表示表中的行。
page:表示在磁盘中的数据块。
buffer:表示在内存中的数据块。
highgo=# \d
List of relations
Schema | Name | Type | Owner
----------------+----------+-------+--------
oracle_catalog | dual | view | highgo
public | a | table | highgo
public | b | table | highgo
public | bindump | table | highgo
public | blog | table | highgo
public | c | table | highgo
public | hexdump | table | highgo
public | persons | table | highgo
public | students | table | highgo
public | t | table | highgo
public | test | table | highgo
public | test01 | table | highgo
public | test_new | table | highgo
public | test_v | view | highgo
public | testa | table | highgo
public | testb | table | highgo
public | testc | table | highgo
public | testd | table | highgo
(18 rows)
highgo=# \di
List of relations
Schema | Name | Type | Owner | Table
--------+-------------+-------+--------+--------
public | t_i_2 | index | highgo | test
public | test01_pkey | index | highgo | test01
(2 rows)

本文介绍了数据库中的关键概念,包括relation、tuple、page和buffer等,并通过具体实例展示了表(table)和视图(view)的区别,以及如何查看数据库中表和索引的详细信息。
289

被折叠的 条评论
为什么被折叠?



