首页 > 数据库 > 数据库开发技术 > DB2的一些基础概念整理笔记
db2 get dbm cfg
db2 get db cfg for
Any entry from the output of this command containing the word 'indirect' means that the entry is for a local database; that is, a database residing in the machine where you are currently working. The entry will also point to the local database directory indicated by the 'Database drive' item (In Windows) or 'Local database directory' (In UNIX).
Any entry containing the word 'Remote' means that the entry is for a remote database; that is, a database residing in a machine other than the one you are currently working on. The entry will also point to the node directory entry indicated by the 'Node name' item.
Local db directory 本地数据库目录
The local database directory directory contains information about local databases; that is, the databases residing in the machine where you are currently working.用以下命令查看:
db2 list db directory on
Node directory
The node directory is used to store all connectivity information for remote databases.
可以在作为客户端的节点上查看:db2 list node directory
DCS directory
The DCS directory contains connectivity information for host databases normally residing on a zSeries TM (S/390 ? ) or iSeries TM (AS/400 ? ) machine. You need to have the DB2 Connect software installed.
数据库 database
DB2的数据库是关联到某个实例的封闭且独立的单元。所以多个数据库的内部对象允许同名.一般来讲,不允许同时查询2个数据库内的对象。
A database is created with the command create database . Note that this is considered a command, and not a SQL statement.
When you create a database, table spaces, logs, a buffer pool, and configuration files are automatically created, which is why this command takes a few seconds to complete.
表空间 tablespaces
表空间作为逻辑表格与物理存储空间的界面
The Catalog (SYSCATSPACE), system temporary space (TEMPSPACE1) and the user space (USERSPACE1) are all table spaces, and are automatically created when the database is created.
The Catalog contains meta data (data about your data). Some other RDBMs call this structure a 'data dictionary'. Do not confuse the term 'Catalog' in this section with the catalog command mentioned earlier; they have no relationship at all.
A system temporary table space is the work area for the database manager to perform operations, like joins and sorts. There must be at least one system temporary table space.
The USERSPACE1 table space is created by default, but it can be dropped. It is the default location for storing user tables.
表、索引和大对象
A table is an unordered set of data records consisting of columns and rows. Indexes are ordered sets of pointers associated with a table, and are used for performance purposes and to ensure uniqueness. Video, audio, scanned documents, and so on can be stored in databases as large objects (LOBs). Tables, indexes and LOBs reside in table spaces.
日志
Logs are files used for recovery purposes. Logs record every operation against a database. In case of a failure, logs are crucial to restore a database to a consistent point.
缓存池
A buffer pool is an area in memory where all index and data pages (other than LOBs) go through in ordered to be processed. It is basically a cache used by the database manager. Buffer pools are the most important objects to tune in database performance problems.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11325862/viewspace-1258736/ ,如需转载,请注明出处,否则将追究法律责任。