Database setup and SQL statements for the server