Protecting Tuple from DELETE query

Protecting Tuple from DELETE query

Post by Kevin Bri » Tue, 21 Jul 1998 04:00:00

I currently am developing an application that relies one one main table
with about seven subtables in a one to many relationship with the main
table.  Each subtable, for various reasons has what I describe as a
default value (better described as a default tuple), so on the data entry
form, if the user does not enter information for that field, the default
value is used.  The subtables are defined by an Autoincrementing field,
and a user changeable 'Name' field.  A tuple is designated as being the
default it its autoincr. field has a value of 1.

Now, I also have a query builder that supports the SQL DELETE command, and
it is possible that the user can delete the default tuple in a table,
causing all sorts of problems.  Is there a way to prevent DELETE queries
from removing this tuple?  For example if the user enters DELETE * FROM
[Composers] WHERE blah.., should I parse this to DELETE * FROM (SELECT
* FROM Composers WHERE Key>1) WHERE blah..?

Is this on the right track, or is there a simpler way of doing this?

Thank you,
KEvin Brill

* Kevin Brill               University of Florida                 *

* "...can you believe Jorge Orta lost that ball in the sun?  How  *
*     can a guy who was raised in Mexico lose a ball in the sun?" *
*       - Harry Caray (God bless)                                 *


1. Tuple at tid already deleted problem - Help


I have below a query that seems to not want to go away.  The Table concerned
is Btree Unique with 7 2nd ary indexes all btrees.

Table has been optimized and sysmod.

I have run tests against the table as like below and have no problems in the
Update, or for that matter Inserts.  Yet when the process is run the whole
thing seems to fall apart.

We running Ingres 6.4/07 on Solaris.


update vhc_cntr set
             dsct_dat=20021212 ,
             last_updt_user=2601 ,
             where avis_cmpy_id=1
             and vhc_cntr_id=880551
             and vhc_cntr_seq_nbr=3

        E_QE0069 .
            (Wed Dec 11 18:12:15 2002)

        End of Request - Terminated by Errors


2. Platform choice

3. No long-lived transaction, still can't delete tuples

4. Large number and external procedures

5. Problems with deleting tuples

6. I never wanted to be a wait()er

7. E_QE0069 Tuple at tid already deleted - problem

8. video and audio streaming on the internet

9. SQL delete query deletes but does not delete

10. Protecting from deleting all records ?

11. protected ON DELETE CASCADE

12. Delete Queries - Changing the name of DELETED.DB

13. Working with protected Access DB and non-protected DB in the same application