def create_tables(con):
    """ Use SQL to create data structures
    Args:
        con: database connection object
    Returns:
        true if creation is successful, otherwise returns the exception
    """

    cursor = con.cursor()
    try:
        cursor.execute("""
            CREATE TABLE Tagit.Resource
            (
                uri VARCHAR(4096), 
                title VARCHAR(512), 
                type VARCHAR(512) DEFAULT 'bookmark', 
                views INT DEFAULT 1, 
                %PUBLICROWID 
            )
        """)
        cursor.execute("""
            CREATE TABLE Tagit.Tag
            (
                name VARCHAR(128) UNIQUE, 
                description VARCHAR(4096),
                %PUBLICROWID 
            )
        """)
        cursor.execute("""
            CREATE TABLE Tagit.TagMap
            (
                tagid INT, 
                resourceid INT, 
                CONSTRAINT tagidFK FOREIGN KEY (tagid) REFERENCES Tagit.Tag, 
                CONSTRAINT resourceidFK FOREIGN KEY (resourceid) REFERENCES Tagit.Resource, 
                %PUBLICROWID 
            )
        """)
        con.commit()
    except Exception as e:
        print("Error creating tables: " + str(e))
        return e

    print("Created tables!")
    return True