-
Sales and Customer Management:
customer and employee store details about users and staff.
invoice and invoice_line track sales, linking customers to the specific tracks they purchased, including price and quantity.
2.Media Content Management:
track is the central table for the media items (songs, videos, etc.), holding details like name, composer, size (bytes), duration (milliseconds), and price.
album groups tracks together and links them to a specific artist.
genre and media_type (e.g., MPEG audio file, protected video file) categorize the tracks.
3.Organization and Playlists:
playlist allows users to create collections of tracks.
playlist_track is a linking table that defines which tracks belong to which playlists.
Single-Column Keys: Most tables, like customer, track, and artist, use a single, auto-generated ID column as their primary key.
Composite Key: The playlist_track table uses a Composite Key consisting of two columns: playlist_id and track_id. This is necessary because the table links tracks to playlists, and the combination of the two foreign keys is required to uniquely identify each entry (i.e., a specific track within a specific playlist).