def _get_table_name(suite, config, repository_url):
    """Get the name of the table used to store records in the database.

    Parameters
    ----------
    suite: str
        Name of the suite.
    config: SafeConfigParser
        Configuration for the suite.
    repository_url: str
        SQLAlchemy URL for the repository in use.

    Returns
    -------
    str
        Name of the table to use in the database

    """

    if repository_url.startswith("sqlite"):
        result = config.get("repository", "table")
    elif repository_url.startswith("postgresql"):
        result = "{suite}_records".format(suite=suite)
    else:
        raise NotImplementedError
    return result