public function createTables(Database $database) {

        $this->database = $database;


        $this->database->startTransaction();

        $this->createAuthorityTable();
        $this->createAuthorityPermissionsTable();

        $this->createMenutable();
        $this->createMenuGroupTable();
        $this->createOptionsTable();
        //$this->createContentmetaTable();
        //$this->createContentsTable();
        $this->createSessionTable();
        $this->createTaxonomyTable();
        $this->createObjectsTable();
        $this->createGroupsTable();
        $this->createObjectsAuthorityTable();
        $this->createObjectsGroupTable();
        $this->createObjectsEdgesTable();
        $this->createPropertiesTable();
        $this->createPropertyDatatypeTable();
        $this->createPropertyValuesTable();
        $this->createIndices();
        $this->insertPropertyDatatypes();
        $this->createObjectsRatingTable();
        $this->createPropertyValuesProxyTable("attachment"); //The attachment table
        $this->createPropertyValuesProxyTable("media"); //The media table
        $this->createPropertyValuesProxyTable("user"); //The users table
        $this->createPropertyValuesProxyTable("page"); //The users table
        //$this->createUsermetaTable();
        //$this->createUsersTable();
        //$this->createUsersView();

        if (!$this->database->commitTransaction()) {

            //$this->setError($this->$database->getError());

            return false;
        }

        return true;
    }