TAILIEUCHUNG - Applied Mathematics for Database Professionals phần 9

Bây giờ chúng ta xem xét lại các vấn đề liên quan đến các khó khăn thuộc tính hạn (được đề cập trong phần "Phân loại Schema cho ràng buộc" trong Chương 7). Chính thức, đặc tính chỉ gắn bộ thuộc tính-giá trị cho các thuộc tính. Đính kèm một thuộc tính giá trị thiết lập cho một thuộc tính có thể được coi là một hạn chế thuộc tính. | 300 CHAPTER 11 IMPLEMENTING DATABASE DESIGNS IN ORACLE DML Statements Operate in a Single Manner A DML statement is an INSERT an UPDATE or a DELETE statement. However a valid state transition of one table structure might require more than one type of DML statement to achieve and thus could possibly give rise to the need to allow temporary violations for table constraints too. For example take the following not very realistic table constraint The number of sales reps plus twice the number of clerks must equal either 100 or zero. Let s look at the transaction of introducing a clerk. Assume that the current EMP table holds 100 sales reps rendering our table constraint TRUE . As soon as we introduce the new clerk either by updating the JOB of a sales rep or by inserting a new clerk we ll always introduce a violation and need a second different type of DML statement to restore the truth of the table constraint. This shortcoming of the SQL language implies that DI code for certain table constraints can be subject to deferred execution too. We ll call table and database constraints that require temporary violations inside transactions deferrable constraints. Outline of Execution Model for Deferred Checking If a DML statement say DML1 introduces a violation within a transaction then there must be a subsequent DML statement within the same transaction say DML2 that corrects the violation introduced by DML1 prior to the end of the transaction. On execution of DML1 you would either Not want to execute the involved DI code at all but instead schedule it to be executed at the end of the transaction or Have the involved DI code execute in such a way that only if it detects a violation is it scheduled to be re-executed at the end of the transaction. In both cases if on re-execution of the DI code the constraint is still found to be violated then the transaction should obviously be prohibited from committing. So how do you schedule DI code to be executed at the end of a .

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.