Path: utzoo!yunexus!geac!daveb From: daveb@geac.UUCP (David Collier-Brown) Newsgroups: comp.databases Subject: Re: Informix 4GL Question? Summary: well, a wee bit broader than that... Keywords: Informix 4GL Message-ID: <2314@geac.UUCP> Date: 22 Feb 88 18:35:31 GMT Article-I.D.: geac.2314 Posted: Mon Feb 22 13:35:31 1988 References: <714@uel.uel.co.uk> Reply-To: daveb@geac.UUCP (David Collier-Brown) Organization: The Geac Thimktank :-} Lines: 32 In article <714@uel.uel.co.uk> andrew@uel.uel.co.uk (Andrew Josey) writes: >When deleting records in my database I check whether they are >referenced by any other records. This is currently done by code >similar to the following : > >let counter = 0 >select count (*) into counter from table > where table.column = key >if counter > 0 >... >As some of my database tables are large, I would like to find >an alternative technique that terminates after finding the first >match instead of searching the whole table. This is interesting, in that it is a perfectly plausible request that does not **seem** to be well-defined in the relational algebra/calculus (and perhaps even less well-defined in the *#%!@?&& sublanguages we get with them). Can someone with a deeper knowledge of relational theory comment on this, especially with respect to saying 1) "give me one of" -- the current problem 2) "give me the first n of" -- from a problem in bibliographic search 3) "give me any n of" --dave (this exists for a reason. I wonder what it is) c-b -- David Collier-Brown. {mnetor yunexus utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.