More work integrating the SQL DB.