Skip to content

Rename database schema items for clarity and consistency #937

Open
@wesleywiser

Description

@wesleywiser

I've been looking at the current database schema to try to understand how it works. I've looked at the recently added schema documentation and some of the names were difficult to decipher at a glance. For example, the column names aid and cid and the table names pstat_series and pstats. (What does the p stand for?)

I think it would help the reader understand the database schema faster if some of these things were renamed. I propose the following:

  • aid columns -> artifact_id
  • cid columns -> collection_id
  • crate columns -> benchmark_id
  • series columns -> series_id
  • benchmark.stablized -> benchmark.runs_on_stable
  • pstats table -> statistics
  • pstat_series table -> statistics_series

This creates consistency in the schema in that all columns which reference other tables' primary keys are identified via the _id suffix and it makes it easier to understand what a column is at a glance by expanding some of the single letter abbreviations.

This is relatively easy to do and the migrations to perform these renamings will run quickly since this only affects table metadata and not the content of the tables themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-databaseIssues having to do with the databaseC-improvementThis isn't a feature or a bug fix but makes things better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions