Data integrity within a small example application, using SQL