def extract_data(psql_conn):
    """Given a cursor, Extracts data from PostgreSQL movielens dataset
    and returns all the tables with their data"""
    genres = psql_conn.query_all("genres")
    movie_genres = psql_conn.query_all("genres_movies")
    movies = psql_conn.query_all("movies")
    ratings = psql_conn.query_all("ratings")
    users = psql_conn.query_all("users")
    tables = (genres, movie_genres, ratings, users, movies)
    return tables