Data Dictionary - Chinook
Data Dictionary - Chinook
Background
The Chinook database is a sample database used for teaching and practising database management
concepts and SQL queries. It models a digital media store, containing tables related to music albums,
artists, customers, invoices, and more.
Data model
The Chinook database follows a relational data model, with structured tables representing various
entities related to a digital music store, as seen in Figure 1. Here are some key characteristics and
observations about the data model of the Chinook database:
● Tables: The database is organised into multiple tables, each representing a specific entity or
concept, such as albums, artists, customers, invoices, and tracks. This conforms to the
principles of a relational data model, where data is stored in structured tables.
● Primary keys: Each table typically has a primary key column (e.g., AlbumId, ArtistId, CustomerId)
that uniquely identifies each record within that table. Primary keys are used to establish
relationships between tables.
● Foreign keys: Relationships between tables are established using foreign key columns (e.g.,
ArtistId in the Albums table), which reference the primary key columns in related tables. These
foreign keys create associations between records in different tables, allowing for data retrieval
and analysis across tables.
The data model, including the column names, data types, feature descriptions, and their constraints, is
included in Table 1.
Albums table
This table stores information about music albums, including their titles and associated artists.
Artists table
Customers table
This table stores information about customers who purchase music from the store.
VARCHAR(40)
FirstName The customer's first name. NOT NULL
Invoices table
This table contains records of customer invoices, including details about purchases made.
InvoiceDate DATETIME The date when the invoice was issued. NOT NULL
InvoiceItems table
This table stores details about individual items (tracks) within each invoice.
Column name Data type Feature description Constraints
InvoiceLineId INT Unique identifier for each invoice item. Primary key
MediaTypes table
This table contains information about different media types used for music tracks.
MediaTypeId INT Unique identifier for each media type. Primary key
Tracks table
This table stores information about individual music tracks, including their titles, associated albums,
media types, genres, composers, durations, sizes, and prices.
Playlists table
This table contains records of playlists created by users, storing the names of the playlists for
organising and grouping music tracks.
Playlist_track table
This table serves as a junction between playlists and tracks, storing associations between playlists
and the specific tracks they contain.
Genres table
This table holds information about music genres, providing a list of distinct musical categories for
categorising and organising tracks based on their genre.