Re: [sqlite] many-one relation

2007-10-08 Thread John Stanton
confusing message earlier -x- Chetana - Original Message From: Trevor Talbot <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Monday, October 8, 2007 9:10:22 PM Subject: Re: [sqlite] many-one relation On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: We go

Re: [sqlite] many-one relation

2007-10-08 Thread Trevor Talbot
I wrote: > On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: > > >> Is this a garbage collection situation, where you want a row in B to go > > >> away when all referring rows in A are deleted? > > > > Yes exactly this is what I wanted :) > Maintaining a reference count in table B may be mor

Re: [sqlite] many-one relation

2007-10-08 Thread Trevor Talbot
On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: > >> Is this a garbage collection situation, where you want a row in B to go > >> away when all referring rows in A are deleted? > > Yes exactly this is what I wanted :) Okay. A trigger on table A can accomplish it without any extra tracking

Re: [sqlite] many-one relation

2007-10-08 Thread Kees Nuyt
On Mon, 8 Oct 2007 09:04:53 -0700 (PDT), you wrote: >>> Is this a garbage collection situation, where >>> you want a row in B to go away when all >>> referring rows in A are deleted? > >Yes exactly this is what I wanted :) > >Sorry for the confusing message earlier > >-x- >Chetana This might b

Re: [sqlite] many-one relation

2007-10-08 Thread chetana bhargav
PROTECTED]> To: sqlite-users@sqlite.org Sent: Monday, October 8, 2007 9:10:22 PM Subject: Re: [sqlite] many-one relation On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: > We got two tables, tableA & tableB. > > tableB is turning out to be a many-one relation where in we h

Re: [sqlite] many-one relation

2007-10-08 Thread Trevor Talbot
On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: > We got two tables, tableA & tableB. > > tableB is turning out to be a many-one relation where in we have many rows of > tableA mapping to one row of tableB, would like to know what is the best way > to delete a row in tableB > > 1. Keep a

[sqlite] many-one relation

2007-10-08 Thread chetana bhargav
Hi All, We are designing a data base landed in some problems would like to know what approach is the best. We got two tables, tableA & tableB. tableB is turning out to be a many-one relation where in we have many rows of tableA mapping to one row of tableB, would like to know what is the best