iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To design a database for a music marketplace, separate what the music is from what a seller offers and what a buyer purchases. In particular, do not use one generic “song” row for a composition, a particular recording, a release edition, and a seller’s listing. Those are different identities, and combining them makes credits, editions, prices, and purchase history difficult to represent accurately.
Start with a catalog model, then connect it to marketplace records. The right tables for formats, territories, rights, and payments depend on whether the service sells downloads, physical releases, licenses, or a mix.
Model the music catalog before the marketplace
A useful catalog distinguishes the creative work, its recordings, the releases that contain those recordings, and the seller’s offer. MusicBrainz’s database schema makes many of these distinctions in a mature music-metadata system. Its documentation describes the schema as a work in progress, reports schema version 31 released in Q2 2026, and notes that some tables are undocumented; use it as a domain reference, not as a complete marketplace blueprint.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Entity | What it represents | Typical relationship |
|---|---|---|
| Artist or contributor | A person, group, or other music professional. Keep canonical identity distinct from aliases and the names shown in credits. | Can be connected to works, recordings, releases, and tracks through role-bearing credit or relationship records. |
| Work | The composition, such as a song, independent of a particular audio version. | One work may be associated with multiple recordings. |
| Recording | A particular audio mix or edit, with its own metadata and identifiers. | Can be used by one or more track placements. |
| Release group | An abstract album, single, or EP grouping. | Can group multiple specific releases or editions. |
| Release | A specific real-world edition, with details such as date, country, label/catalog-number pair, packaging, and status. | Contains one or more media units. |
| Medium | A disc or other media unit within a release. | Contains ordered track placements. |
| Track | A placement on a medium, with a position and a link to a recording. | Belongs to a medium; its title or credit may differ from another placement of the same recording. |
The conceptual path is Artist / Contributor ↔ Work ↔ Recording → Track → Medium → Release → Release Group. It is not a full database definition: choose exact cardinalities and join tables based on the product’s requirements.
Why a track is not the same as a recording
A recording describes audio; a track describes where that recording appears in a particular release. The distinction matters because editions can contain different media or use different track ordering. The track’s position is therefore contextual, not an intrinsic property of the recording.
Track-level credits can also differ from release-level credits. MusicBrainz’s schema documentation says: “A track’s artist can be different than the artist of the release, so there’s an artist column which can optionally contain the name of the track’s artist.” Store release and track credits separately when the product needs to preserve that distinction. Avoid treating a comma-separated artist-name string as a reliable representation of multiple artists or contributor roles.
Represent credits and relationships as data
Many music relationships are many-to-many: an artist may contribute to multiple works, and a work can have multiple contributors or recordings. Model those connections with relationship or credit records rather than embedding repeated names in a single text field. A relationship record can identify both endpoints and the role involved; the exact roles and cardinalities are product decisions.
Keep canonical entities separate from display credits. The canonical artist identity answers who is associated with an entity; a credit records how a name is presented in a particular context. That separation helps represent aliases, collaborations, and track-specific billing without duplicating or overwriting an artist’s identity.
Rank #3
Attach seller offers to catalog identities
Marketplace activity should refer to catalog records without becoming part of them. A seller’s price or stock status can change while the underlying recording or release remains the same. A practical starting point is to consider separate records for:
- Seller account: the marketplace participant offering an item, with whatever identity and status fields the service requires.
- Listing or offer: the catalog item being offered, its product format, price, availability, and—if relevant—territory or physical condition.
- Order and order line: what a buyer selected and the purchase terms that applied at the time.
- Payment, refund, fulfillment, or delivery events: add these if the product flow requires them.
- Rights or availability evidence: consider this where sales or access are licensed or territorially restricted.
These are design prompts, not a universal required table list. A digital-download shop, a physical marketplace, and a licensing platform may need different product and fulfillment concepts. Preserve purchase-time facts on an order line or related snapshot so later edits to a listing’s price or catalog metadata do not silently rewrite the historical transaction.
Rank #4
Choose keys and constraints around real rules
Use primary keys to give rows stable identities and foreign keys to enforce references between related records. Add uniqueness rules only for identifiers that are genuinely unique in the relevant scope. For example, an identifier may be unique globally, or only within a particular label or namespace; the business rule determines the constraint.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Use nullability deliberately and add checks for local rules the database can enforce. PostgreSQL’s official constraints documentation explains primary keys, foreign keys, unique constraints, check constraints, and nullability. Confirm behavior against the PostgreSQL version actually deployed before relying on version-specific features.
Relationship tables can use a composite primary key when the pair of referenced entities should occur only once. The public Music Database Schema Design example demonstrates foreign keys from albums to artists and songs to albums, and a composite key for song/genre assignments. That is a useful introductory pattern, not proof that every marketplace relationship should use the same key.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Compare design choices by the problem they solve
| Design question | Clearer model | What becomes harder if collapsed |
|---|---|---|
| What does “song” identify? | Use separate work, recording, and track-placement concepts. | Different mixes, edits, editions, and track positions become ambiguous. |
| Where does a price belong? | Store it on a seller’s offer, not on the canonical recording or release. | Multiple sellers and changing prices overwrite one another. |
| How should past purchases be represented? | Preserve purchase-time terms on the order line or a related snapshot. | Later catalog or price edits can change the apparent history. |
| How should multiple artists or roles be stored? | Use structured credits and relationship records. | One name string cannot reliably express separate contributors and roles. |
| How much normalization is practical? | Begin with clear entities and keys; add cached or derived representations for a measured query or operational need. | Premature denormalization couples unrelated facts and makes updates harder to keep consistent. |
The simpler music catalog example uses artist, album, song, and genre concepts. It is useful for basic relational patterns, but does not model the richer distinction among works, recordings, release editions, offers, and marketplace transactions.
Treat metadata and sales rights as separate concerns
Music metadata can help identify and describe catalog entities; it does not establish permission to sell, stream, or license them. Rights, permitted territories, royalty splits, payout timing, tax handling, and dispute states require business and jurisdiction-specific requirements that a metadata schema does not settle.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesIf you plan to enrich the catalog from MusicBrainz, review its API documentation for current access terms and technical limits. The documentation says non-commercial use of the web service is free, directs commercial users to its commercial plans, and sets a limit of no more than one API call per second per client application. Those terms can change, and metadata enrichment is not rights clearance.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

