the first paragraph:
As an example, say we wish to find all the records that
are in the temperature range of other records. In
effect, we need to compare the temp_lo and temp_hi
attributes of each EMP instance to the temp_lo and
temp_hi attributes of all other EMP instances.
I believe that EMP should read WEATHER, as the example query that
follows joins WEATHER to itself.
EMP is often used in Oracle examples.
Regards,
Graham
Other RULE cleanups
As an example, say we wish to find all the records that
are in the temperature range of other records. In
effect, we need to compare the temp_lo and temp_hi
- attributes of each EMP instance to the temp_lo and
- temp_hi attributes of all other EMP instances.
+ attributes of each WEATHER instance to the temp_lo and
+ temp_hi attributes of all other WEATHER instances.
This is only a conceptual model. The actual join may
CREATE RULE bad_rule_combination_1 AS
ON SELECT TO emp
DO INSTEAD
- SELECT TO toyemp;
+ SELECT * FROM toyemp;
CREATE RULE bad_rule_combination_2 AS
ON SELECT TO toyemp
DO INSTEAD
- SELECT TO emp;
+ SELECT * FROM emp;
This attempt to select from EMP will cause