Article View: net.database
Article #262Problem with relational theory
From: Eric Carleen
Date: Thu, 14 Aug 1986 16:34
Date: Thu, 14 Aug 1986 16:34
40 lines
2112 bytes
2112 bytes
I've found that apparently I have a severe misunderstanding of
the use of a relational data base, specifically Ingres. I'm sending
out a summary of my question because I've found that a number of
other people have the same misunderstanding.
Suppose that I have 3 tables of names, call them table1, table2, and
table3. The names in tables 2 or 3 may or may not be in table1. I
would like to delete all those records in table1 that are already listed
in the other two tables.
If I give the command:
delete table1 where table1.name = table2.name
or table1.name = table3.name
then I get what I was after: entries that match EITHER table2 OR table3
are deleted.
unless... table3 is empty. If table3 is empty, then nothing is deleted
from table1, regardless of whether or not there are any matching entries
in table2. (The work-around is obvious, but I thought unnecessary.)
Technical support at Relational Technologies insists that this is the
correct way for a deletion to occur.
I guess that I need to learn more about relational databases - so would
people please mail me names of references that are readable? Thanks much.
I want to emphasize that I am generally very happy with Ingres, just
surprised at the behavior of this particular delete command.
Eric Carleen
University of Rochester Medical Center
UUCP: {seismo|allegra}!rochester!ur-msbvax!edc
Bitnet: heartedc@uorhbv
Phone: (716)-275-5391
Technical Details
Message-ID:
<595@ur-tut.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!topaz!husc6!ut-sally!seismo!rochester!ur-tut!ececShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!topaz!husc6!ut-sally!seismo!rochester!ur-tut!ecec From: ecec@ur-tut.UUCP (Eric Carleen) Newsgroups: net.database Subject: Problem with relational theory Message-ID: <595@ur-tut.UUCP> Date: Thu, 14-Aug-86 12:34:20 EDT Article-I.D.: ur-tut.595 Posted: Thu Aug 14 12:34:20 1986 Date-Received: Sun, 17-Aug-86 06:22:02 EDT Organization: Univ. of Rochester Computing Center Lines: 40 Keywords: relational, delete