"Chris Angelico" <ros...@gmail.com> wrote in message news:captjjmp4y5zowwn5yftjutko4h5jvtqlantwqepa6b35xnd...@mail.gmail.com... > > Entirely possible. I never did track down the actual cause of the > SQLite3 issues my students were having; though I suspect it's not > purely a Python API issue. I tried to demonstrate the concept of > foreign keys using the sqlite3 command line tool, and did a sequence > of commands which ought to have failed, but didn't.
The default is for sqlite3 to ignore foreign key contraints. To enable them, add the following - pragma foreign_keys = on; It works for me. Unfortunately it has a limitation, which they acknowledge but they say is unlikely to be addressed. You can access more than one database concurrently by using the 'attach' command, and qualifying a remote tablename as {database} dot {tablename}. You can then include the remote table in any sql command. However, it will not enforce foreign key constraints across databases. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list