Added new sql queries to build database