decapitalized table and column names, corrected foreign key names, updated queries