Urgent.News

What's breaking now, across thousands of outlets.

Tech

Database Modeling of a Music Marketplace. Part 1

I'd like to discuss database modeling of a big music marketplace — the website Discogs.com. It's one of the largest databases of physical music media: CDs, vinyl, cassettes, and so on. It covers millions of artists, albums, and releases. We're going to build the logical model , following the approach from my Database Design Book . That means cataloging three things: anchors, attributes, and links…

In the first part of this article, we will delve into the database modeling of a music marketplace, focusing specifically on the website Discogs.com. Discogs is an extensive database of physical music media, including CDs, vinyl, and cassettes, featuring millions of artists, albums, and releases.

The modeling process will follow a logical approach, identifying three key components: anchors, attributes, and links. This method will not delve into the physical schema, such as tables, indexes, or query optimization, but will concentrate on the business aspects of selling physical music and the specifications required for implementation, as if building a Discogs clone.

The logical schema will be organized into three Google Docs tables: anchors, attributes, and links. Most of the schema will focus on the logical level, which is independent of a specific database server. Later in the series, we will discuss the physical level, where column names and types will be specified.

Anchors are the central elements in the database, representing the primary entities. The first anchor we will explore is the "Band." Each band has a unique ID, which can be found in the URL of an artist's page on Discogs. For example, Pink Floyd's ID is 45467. Bands have various attributes, such as their name, photos, related links, members, and name variations.

The next anchor we will examine is the "Album," which is referred to as "master" in the Discogs URL scheme. Albums also have unique IDs and share similar attributes with bands, such as name, cover photos, and links to related sites. Some albums may have additional information, such as format, label, country, year, credits, and versions.

With these anchors established, we can begin constructing the logical schema by focusing on the attributes. Attributes are the specific pieces of information that belong to each anchor. They are documented as questions, such as "What is the name of this Band?" for bands and "What is the name of this Album?" for albums. By identifying these attributes, we can create a solid logical model before moving on to table design strategies.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Free Email Forwarding for Your Personal Domain With Cloudflare Email Routing

Forward any address at your domain, such as hello@example.com , to an external inbox. For a public address that only has to receive mail, I would put it on Cloudflare Email Routing: the messages land…

  • Cloudflare Email Routing offers free forwarding for personal domain addresses.
  • Service activates with DNS verification and DNS record setup.
  • Multiple email forwarding rules can be created for different patterns.

More from Tuesday 29 September →