RE: [sqlite] Foreign Constraint Triggers Across Attached Databases

2008-01-24 Thread Griggs, Donald
From Nico: You could always copy the users_history table records to an attached DB and "delete from users_history;" after every, or every N, transactions on your main DB. This ways your users_history table size is bounded in the main DB and you still get to keep all your history in a separate

RE: [sqlite] Foreign Constraint Triggers Across Attached Databases

2008-01-24 Thread Fowler, Jeff
y ideas.. - Jeff -Original Message- From: Samuel R. Neff [mailto:[EMAIL PROTECTED] Sent: Thursday, January 24, 2008 10:59 AM To: sqlite-users@sqlite.org Subject: RE: [sqlite] Foreign Constraint Triggers Across Attached Databases I've run into two situations recently where I would

Re: [sqlite] Foreign Constraint Triggers Across Attached Databases

2008-01-24 Thread Nicolas Williams
On Thu, Jan 24, 2008 at 10:59:17AM -0500, Samuel R. Neff wrote: > Due to the restriction that triggers cannot span databases, I have my main > data tables, history tables, and the ActiveTransaction table all in the same > database. I'd really rather the history tables be in a separate database >

RE: [sqlite] Foreign Constraint Triggers Across Attached Databases

2008-01-24 Thread Samuel R. Neff
Hipp [mailto:[EMAIL PROTECTED] Sent: Thursday, January 24, 2008 6:56 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Foreign Constraint Triggers Across Attached Databases Triggers between two separate databases are not allowed since if you DETACH one of the databases, the triggers obviously

Re: [sqlite] Foreign Constraint Triggers Across Attached Databases

2008-01-24 Thread D. Richard Hipp
On Jan 23, 2008, at 10:07 PM, [EMAIL PROTECTED] wrote: I have been trying to implement the paradigm of using Triggers to emulate referential integrity, for example cascading updates and deletes between two database tables. This works when the two database tables are in “main” but when I try