| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Distributed foreign keys (was Re: Category Types)
Paul Vernon wrote:
> "Alexey Kirich" <kirich_a_at_softline.kiev.ua> wrote in message
> news:3ef01f21$1_at_ns...
> [snip]
>
>>This approach can be made with hope, that in the future RDBMSs will support >>OR like foreign constraints.
I've read it, and my personal opinion is that it's totally flawed.
Here's the "recomposition" query:
WITH (EXTEND JOB_UNK ADD ‘Job unknown’ AS Job_info) AS T1,
(EXTEND UNEMPLOYED ADD ‘Unemployed’ AS Job_info) AS T2,
(DOES_JOB RENAME (Job AS Job_info)) AS T3,
(EXTEND SALARY_UNK ADD ‘Salary unknown’ AS Sal_info) AS T4,
(EXTEND UNSALARIED ADD ‘Unsalaried’ AS Sal_info) AS T5,
(EXTEND EARNS ADD CHAR(Salary) AS Sal_info) AS T6,
(T6 { ALL BUT Salary }) AS T7,
(UNION ( T1, T2, T3 )) AS T8,
(UNION ( T4, T5, T7 )) AS T9,
(JOIN ( CALLED, T8, T9 )) AS PERS_INFO :
PERS_INFO
This is simply put an abomination. As Dijkstra has noted in mathematical
elegance is our most effective tools to manage complexity.
The query above is not mathematical elegance, it is mathematical clumsiness.
What was there to discuss about it ?
Cheers,
Costin
Received on Tue Jun 24 2003 - 19:14:44 CDT
![]() |
![]() |