def METHOD_NAME(self):
    dbFileName = os.path.join(self.outputDir, "tiles.sqlite")
    dbinsert = 0
    # Create database
    if os.path.exists(dbFileName):
        os.unlink(dbFileName)
    db = sqlite3.connect(dbFileName)
    # Create and fill info table
    c = db.cursor()
    c.execute(
        """
        CREATE TABLE info (
            desc TEXT,
            tilenumbering TEXT,
            minzoom INTEGER,
            maxzoom INTEGER,
            ellipsoid,
            inverted_y,
            timeSupported,
            tilesize
        )
        """)
    c.execute(
        """
        INSERT INTO info (
            desc,
            tilenumbering,
            minzoom,
            maxzoom,
            ellipsoid,
            inverted_y,
            timeSupported,
            tilesize
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
        """, (
            "World HeightMap",
            "OSM",
            self.minZoom,
            self.maxZoom,
            0,
            0,
            False,
            32,
        ))
    # Create tiles table and index
    c.execute(
        """
        CREATE TABLE tiles (
            x INTEGER,
            y INTEGER,
            z INTEGER,
            image BLOB,
            PRIMARY KEY(x, y, z)
        )
        """)
    c.execute(
        """
        CREATE INDEX _tiles_index
            ON tiles(x, y, z)
        """)
    # Free up current cursor
    c = None
    db.commit()
    # Insert files as blobs in database
    c = db.cursor()
    for tmsTileX, tmsTileY, zoom, tileFilename in self.inputTiles:
        maxTileIndex = 2**zoom - 1
        tileX = tmsTileX
        tileY = maxTileIndex - tmsTileY
        if self.options.verbose:
            print("... %dx%d@%d: %s" % (
                tileX,
                tileY,
                zoom,
                tileFilename,
            ))
        with open(tileFilename, "rb") as tileFile:
            c.execute(
                """
                INSERT INTO tiles (
                    x,
                    y,
                    z,
                    image
                ) VALUES (?, ?, ?, ?)
                """, (tileX, tileY, zoom, sqlite3.Binary(tileFile.read())))
            dbinsert = dbinsert + 1
        if dbinsert > 100:
            dbinsert = 0
            db.commit()
    # Release database
    db.commit()
    db.close()
    del db