def choose_db(conn, db_name: str) -> str:
    """Select the db and create it if it doesn't exist.

    Args:
        conn: pymysql.connection object to the MySQL server.
        db_name: name of the database.

    Returns:
        A status string.

    """
    with conn.cursor() as cursor:
        if cursor.execute("SHOW DATABASES LIKE '{}';".format(db_name)):
            cursor.execute("USE {};".format(db_name))
            return "Database {} exsit!".format(db_name)
        else:
            cursor.execute("CREATE DATABASE IF NOT EXISTS {};".format(db_name))
            cursor.execute("USE {};".format(db_name))
            return "Database {} created!".format(db_name)