Added database methods and SQL-schema.