| ▲ | andrewstuart 2 hours ago | |
>> Why is it a problem that it allows data that does not match the column type? “Developers should program it right” is less effective than a system that ensures it must be done right. Read the comments in this thread for examples of subtle bugs described by developers. | ||
| ▲ | lateforwork 2 hours ago | parent [-] | |
> “Developers should program it right” is less effective than a system that ensures it must be done right. You're right, of course. But this must be balanced with the fact that applications evolve, and often need to change the type of data they store. How would you manage that if this is an iOS app? If SQLite didn't allow you to store a different type of value than the column type, you would have to create a new table and migrate data to a new table. Or create a new column and abandon the old column. Your app updates will appear to not be smooth to users. So it is a tradeoff. The choice SQLite made is pragmatic, even if it makes some of us that are used to the guarantees offered by traditional RDBMSs queasy. | ||