Agreed. I originally thought your complexity argument was against implementing 
it inside SQLite.
 - Levi


----- Original Message -----
From: d...@sqlite.org

To: LEVI HASKELL (BLOOMBERG/ 731 LEXIN), sqlite-users@sqlite.org

At: Dec 12 2012 16:28:43






On Wed, Dec 12, 2012 at 4:18 PM, Levi Haskell (BLOOMBERG/ 731 LEXIN) 
<lhask...@bloomberg.net> wrote:


On Wed, Dec 12, 2012 at 3:40 PM, Richard Hipp <d...@sqlite.org> wrote:



>On Wed, Dec 12, 2012 at 3:36 PM, Richard Hipp <d...@sqlite.org> wrote:

>> On Wed, Dec 12, 2012 at 2:29 PM, Levi Haskell (BLOOMBERG/ 731 LEXIN) <


>> lhask...@bloomberg.net> wrote:

>>

>>> My suggestion would be to have check_integrity command verify referential

>>> integrity as well only if it's executed while the foreign key enforcement

>>> is enabled on the connection.

>>>

>>


>> This seems like a reasonable request.  And while we are at it, we will

>> likely also verify UNIQUE and CHECK constraints too.




Thank you!



>>

>

>By the way, verifying foreign key constraints is trickier than it seems at

>first glance, because you have to make sure to get it right for cases

>involving NULLs and differing collating sequences and affinities between

>parent and child tables.




Intresting, doesn't sqlite3FkCheck() already take these into account?

Yes, it does.  But not every home-brew solution to this problem does.  That's 
why we really ought to handle this inside of PRAGMA integrity_check, rather 
than tossing the problem over the wall to applications developers, as is done 
now.  The whole point of SQLite is to free up app developers to focus on their 
application logic by simplifying the storage and persistence problem.  Checking 
foreign key constraints really ought to be part of what SQLite does 
automatically.


 



Just curious.

 - Levi

_______________________________________________

sqlite-users mailing list

sqlite-users@sqlite.org

http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users







-- 
D. Richard Hipp
d...@sqlite.org




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to