Target aggregation table in DB2 (1)

Source: Internet
Author: User

There are various tables in the DB2 database. This article will introduce you to the clustering target table. This table is a special table in DB2. If you are interested in this, take a look.

There is a special table in the DB2 database called the clustering target table. This clustered target table is a read-only table that uses SQL column functions, such as the sum function or avg average function, to calculate all the content in the source table or track the latest changes to the data in the source table. This aggregation target table is similar to the view and is read-only and is used for statistics on the basic table. However, it is essentially different, that is, over time, the system will append rows to the target clustering table. That is to say, the data in the table actually exists in the Database, rather than a virtual table as you see it. It can be seen that the clustered target table can play a similar role in the view, but it may ensure data stability.

1. Understand the CD table in the DB2 database.

Before analyzing the role of a specific target table on the DB2 database, I think we should first understand the CD table. This is also a unique identifier in DB2 databases. The clustered target table is created based on the CD table. In DB2 databases, data replication functions similar to other databases can be implemented. That is, data can be copied and synchronized between the source database and the reservation integrator to generate database copies. Sometimes in the reservation integrator, you may need to track the changes to the data source table. In this case, you need to use this CD table. DB2 official documentation defines CD tables as follows: each user table registered for the capture and replication of changes on the DB2 database server has a corresponding change data table. Simply put, this CD table is also called a change data table. It is used to help the database administrator track the changed data (including update, delete, insert, and so on) in the source table ). An application reads the rows submitted in the change data table and copies them to any target table mapped to the registered table. For administrators who are new to the DB2 database, they only need to know that the CD table (data update table) is used to analyze and track user changes in the source table.

Ii. Type and Difference Analysis of the clustered target table.

In the DB2 database, there are two main types of clustering tables: Basic clustering tables and change clustering tables. Both tables are clustered tables, but they are quite different. As a database administrator, you must understand the differences between them and select an appropriate clustering target table based on your needs. Simply put, the main difference between the two target tables lies in the different statistical source tables. The data in the source table is different, and the results of the two clustering tables are quite different.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.