Some time ago I wrote a small tool which generates triggers to enforce foreign key constraints in SQLite, I see someone else might find use for it, so I figured I should post to the list.
You can pick it up at: http://odin.nmxs.com/~cpisto/sqlite_fk.tgz There is a readme included in the tarball, but suffice to say it is a very basic sql parser that knows how to generate triggers from CREATE TABLE blocks. it doesnt understand the full syntax that sqlite supports for column definitions, but if someone needs something extra supported, let me know and I will add it. Since I wrote it for use with sqlite, its released into the public domain like sqlite. Ive included a prebuilt linux x86 binary, and win32 exe in the tarball as well. example usage: cat schema.sql | ./fk