Module relations

Source
Expand description

Deriving the typed links between entities.

Relations are inferred, never read from a file: they follow from the credits and from the track lists. That is what RELATION_RULES versions, and what lets a stored catalog rebuild them on load without touching the disk — the reason the raw tags are kept per file in the first place.

Structural links are derived alongside the two original inferred families: placements, recordings, works, editions, release groups, labels and album artists can all be traversed in either direction. Artist participation is derived from credits without copying credit details into the relation row. Collaborations and duplicate/other-edition links remain weighted summaries.

Constants§

ALBUM_BY
A release is primarily credited to an album artist.
APPEARS_ON
A guest performer appears on another artist’s release.
COMPILATION_APPEARANCE
A performer appears on a compilation.
CONTRIBUTED_TO
A non-performing credit contributes to a release.
DISCOGRAPHY
Reverse of ALBUM_BY.
DUPLICATE
Names of the two relations that tie one album to another copy of itself.
EDITION_OF
A release is one edition of a release group.
HAS_EDITION
Reverse of EDITION_OF.
HAS_RECORDING
Reverse of PERFORMANCE_OF.
HAS_TRACK
Reverse of PART_OF_RELEASE.
OTHER_EDITION
Same album, encoded differently: a deliberate second copy.
PART_OF_RELEASE
A local track belongs to one edition.
PERFORMANCE_OF
A recording realizes a musical work.
PLACED_AS
Reverse of PLACEMENT_OF.
PLACEMENT_OF
A local track placement points to the abstract recording it carries.
RELATION_RULES
Version of the rules that derive the relation table.
RELEASED
Reverse of RELEASED_BY.
RELEASED_BY
A release was issued by a label.

Functions§

rebuild_relations
Recomputes every inferred relation from the entities already in place.