Added constraints for bad data inserted into SQLite database