TAILIEUCHUNG - oracle 9i the complete reference phần 7

Trong danh sách sau đây, vòng lặp đơn giản để tính diện tích hình tròn hiển thị, với hai sửa đổi (được in đậm). Một biến mới tên là some_variable được khai báo trong phần Tờ khai, và tính toán để xác định giá trị của biến được tạo ra trong phần thực thi lệnh. | Chapter 33 Advanced Object-Oriented Concepts 615 The object table itself is not mentioned in the query. The only table listed in the query is KEEPER. You do not need to know the name of the object table to DEREF its values. The entire referenced row object was returned not just part of the row. These are significant differences that separate object queries from relational queries. Thus when querying your tables you need to know the way in which their relationships are established. Are the relationships based on foreign keys and primary keys or on object tables and REF datatypes To help smooth the transition between relational and object-oriented approaches Oracle allows you to create object views that contain REFs superimposed on existing relational tables. See Object Views with REFs later in this chapter. The VALUE Function The DEREF function was applied to the relational table the KEEPER table in this case. The DEREF function returns the value of the reference that goes from the relational table to the object table. What about querying from the object table Can you select from ANIMAL I select from ANIMAL BREED NAME BIRTHDATE MULE FRANCES 01-APR-02 DOG BENJI 03-SEP-01 Even though ANIMAL is an object table you can select from it as if it were a relational table. This is consistent with the examples of inserts and selects shown earlier in this chapter. However that is not what was shown via the DEREF. The DEREF showed the full structure of the abstract datatype used by the ANIMAL object table t select DEREF from KEEPER K where KeeperName CATHERINE WEILZ DEREF BREED NAME BIRTHDATE ANIMAL_TY DOG BENJI 03-SEP-01 To see the same structures from a query of the ANIMAL object table use the VALUE function. As shown in the following listing VALUE shows you the data in the same format that DEREF will use. The parameter for the VALUE function is the table alias. t select VALUE A from ANIMAL A where Name BENJI 616 Part IV Object-Relational Databases .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.