Trigger updating same table oracle
The order-order item structure is perfectly fine on each individual machine – my order object references two order item objects that exist it’s memory space, your order object references three order item objects that exist in its memory space, and the three rows in the Order Item table all include a foreign key to the row in the Order table representing the order.
When you look at it from the point of view of the entities, the order and its order items, there is an RI problem because my order object doesn’t refer to order item C.
A similar situation would occur if you had deleted order item B – now my order object would refer to an order item that no longer exists.
This assumes of course that the database is the system of record for these entities.
In relational database design the referential integrity rule (Halpin 2001) states that each non-null value of a foreign key must match the value of some primary key.
In the 1970s, when relational databases first came on the scene, the standard implementation technology was procedural languages such as PL/1, Fortran, and COBOL.
When something is changed in the system of record it’s considered an “official” change. When the same entities are stored in several databases you have the exact same referential integrity issues to deal with.
The fundamental issue is that whenever the same entities are represented in several schemas, regardless of whether they are data schemas or object schemas, you have the potential for “cross schema” referential integrity problems.
Keeping these various representations in sync is a concurrency control issue.The best way to look at it is that you now have options as to where referential integrity and business logic is implemented.This article explores the implications of this observation. The components of a new application may be deployed across several types of machines, including various client machines, web servers, application servers, and databases.I read an existing order and its order items into memory on my computer. Shortly thereafter you read the exact same order and order items into memory on your computer.