On Wed, 08 Oct 2014 15:01:39 +0200 Clemens Ladisch <clem...@ladisch.de> wrote:
> SQL constraints were designed to catch _programming_ errors, not > _user_ errors. Neither and both, actually. Database theory doesn't distinguish between different sources of invalid input. Constraints enforce consistency. They prevent the database from reaching a state that's "out of bounds" as defined by its own rules. One way to think about a database is as one giant variable of a single type. All changes have to continue to meet the rules of that type, else it wouldn't be that type anymore. It would be NaD: not a database. Sometimes the user could know. There's no February 31 (except in MySQL). Sometimes the program could know, as when the foreign key referent must be inserted before the reference. Sometimes the program can't know, as when another user reserved seat 32B since it was displayed as available. --jkl _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users