Path: utzoo!mnetor!uunet!portal!cup.portal.com!DMasterson From: DMasterson@cup.portal.com Newsgroups: comp.databases Subject: Re: Referential Integrity Constraints (Long) Message-ID: <3561@cup.portal.com> Date: 29 Feb 88 04:37:25 GMT References: <1342@polyslo.UUCP> Organization: The Portal System (TM) Lines: 68 XPortal-User-Id: 1.1001.2888 In message (1342@polyslo.UUCP) lchirica@polyslo.UUCP writes: >--- This article could not take any more nesting ------- Well here we go again (). >In article <3489@cup.portal.com> DMasterson@cup.portal.com writes: >>In message <1320@polyslo.UUCP> lchirica@polyslo.UUCP writes: >>>In article <2314@geac.UUCP> daveb@geac.UUCP (David Collier-Brown) writes: >>>>In article <714@uel.uel.co.uk> andrew@uel.uel.co.uk (Andrew Josey) writes: [The line eater was here] >>> ..... >>>P.S. Referring to your example "select count(*) .... etc., >>> ... >>>any relational DBMS worth paying for will NOT scan the entire relation >>>to get the answer, IF "key" in your text is a primary key. Any reasonable > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>query processor will do a keyed retrieval on "key" and return a 0 or 1 >>>as an answer without scaning the relation. > >>Not entirely true. If "column" is any indexed field in the table, then any > ^^^^^^^^^^^^^ >Sorry about the misunderstanding. I thought that we are talking about "keys" >not just any field. Please note the IF clause in my text. > Whoops, I forgot some database systems make the separation between primary keys and indexed fields. However, I think my point was worth making, although a little misdirected. I just made the cardinal error in relational systems of equating keys with indexed fields. >>can this validity check be used to update other tables based on the current >>update to the current table .... > >No, it cannot. UNIFY does not have "triggered updates", thank goodness! >Some 10 years ago I wrote code for a CODASYL DBMS (which had triggered >or cascaded updates) and I manged to destroy the database. I spent one >whole night putting it back together. I still have occasional nightmares. >All I want from an integrity checking mechanism is an indication that >the application code has violated a constraints. The code then should deal >with the situation as it sees fit, within protection limits, of course. > Hmmm, seems I've heard this feeling about DBMSs before (). I've always said that designing fully relational databases can be tougher than designing networked or hierarchical databases (they're all tough). Glad I asked these questions about Unify, though (forgot more than I thought I had in a year of not using it). >>..... My familiarity is >>with mini- and micro- system databases, there may be other systems for the >>mainframe world (SQL/DS don't count). > ^^^^^^^^^^^^^^^^^^ >Why? SQL/DS and DB2 are direct descendents of System R and they invented >triggers (among other things). > Actually, I can't really talk against (or for) SQL/DS -- I haven't used it. All I have seen is articles by Dr. Codd and others giving it low marks in relational capability (like in how it measures up against Codd's 12 rules or Date's 12 rules). >PS. This group is getting back to life! Or so it seems. > Maybe... Let's keep it going.... >-- >Laurian M. Chirica >Computer Science Department >California Polytechnic State University (CAL POLY) >San Luis Obispo, CA 93407 - (805) 756-1332 David Masterson DMasterson@cup.portal.com