Id like to get your ideas on implementing a stack using sql tables.
table a, contains references to b
table b contains refernce to a
table c contains delete entries for A (but b must also be purged!)
My processing forces me to load all of a,b and c.
There may be cases where table C indicates a complete deletion for table A. As
a special case there is another table D that indicates a complete delete. In
this instance I can delete by another unique Id that is contained in all of the
tables but ommitted for brevity.
create table a ( id integer, ref integer, cnt integer );
create table b ( id integer, ref integer, val text );
create table c ( id integer, cnt integer );
insert into a values (1,32,5);
insert into b values (11,32,'first data item');
insert into c values (1,5) ;
insert into a values (1,33,5);
insert into b values (11,33,'second data item');
insert into c values (1,5) ;
insert into a values (1,34,5);
insert into b values (11,34,'third data item');
After processing, Id like to be left with the following:
a ( 1, 34,5)
b (11, 34, 'third data item')
This is easily implemented in a memory stack. but I'm not sure how to
implement using sql.
thanks for any ideas.
Ken