Oracle Built−in Packages- P146

Oracle Built−in Packages- P146: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Oracle Built-in Packages SEARCH Chapter 16 Conflict Resolution NEXT Column Groups with DBMS_REPCAT Column groups provide a mechanism for guaranteeing data consistency across one or more columns in a replicated table. Every replicated table has at least one column group called the default column group which Oracle creates automatically. You can also create your own column groups and you probably should in which you group logically related fields. About Column Groups Suppose that you have a customer table that contains address information such as street address city state and postal code plus personal information such as last name marital status birth date and phone number. SQL desc customer Name Null Type CUSTOMER ID NUMBER 6 NAME VARCHAR2 30 MARITAL STATUS VARCHAR2 1 PHONE NUMBER VARCHAR2 16 STREET_ADDR VARCHAR2 30 CITY VARCHAR2 30 STATE VARCHAR2 30 POSTAL_CODE VARCHAR2 12 TIMESTAMP DATE GLOBAL_NAME VARCHAR2 30 In this table the fields pertaining to the customer s address . STREET_ADDR CITY STATE and POSTAL_CODE are logically related. You would not want to allow an update at one site to set the CITY to San Francisco and an update at another site to set the STATE to Mississippi since as of this writing there is no such municipality as San Francisco Mississippi. Oracle s answer to this potential catastrophe is the column group. A column group is a logical grouping of columns whose collective values are treated as a unit. If we create a column group and add the address-related fields STREET_ADDR CITY STATE and POSTAL_CODE we can be sure that rows in this table will always contain consistent values for these columns. We can also make a second column group consisting of the fields NAME MARITAL_STATUS and PHONE_NUMBER. Note that a row in this table could contain address information that was entered at one site and name information that was entered at another site. As we shall see in the later section Built-in Resolution Techniques every column group needs

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.