minor updates to data model; updated sql and new sql