Added the SQL for the database model, and fixed a method related to database data extraction.