Skip to content

Database Schematic

William Hubbard edited this page Sep 17, 2021 · 1 revision

The player database contains a cache of a user's entire song collection.

The database is currently at version 1.0.

Tables

  1. local_songs
  2. local_albums
  3. internet_songs
  4. internet_albums

local_songs

This table contains a list of all song files found in ${user.home}/Music

Name Type Description Example
File * † TEXT The path to where the song is stored "/home/markil3/Music/Alan Walker & Sophia Somajo/Diamond Heart - Single/01 Diamond Heart.m4a"
Codec CHAR(5) The codec the song is stored in. "aac"
Type CHAR(5) The file type the song is stored in. "m4a"
Title TEXT The name of the song. "Diamond Heart"
Artists Text The artists that contributed to the song, with the individual entries separated by semicolons. "Alan Walker;Sophia Somajo"
Track INTEGER The track number of this song 1
Disc INTEGER The disc the song is on 1
Duration BIGINT The duration of the song, in milliseconds. 239800
Album Text The name of the album this song is part of. This corresponds to the album column of the local_albums table. "Diamond Heart - Single"
Mod BIGINT The last time this file was modified, as returned by java.io.File.lastModified() 1605484397248

local_albums

This table contains a list of all albums that the songs in local_songs are part of.

Name Type Description Example
album * † TEXT The name of the album "Diamond Heart - Single"
artists TEXT A list of artists that contributed to the album, with individual entries separated by semicolons. "Alan Walker;Sophia Somajo"
year INTEGER The year the album was released. 2018
genres TEXT A list of genres that the song can be assigned to, with individual entries separated by semicolons. "Dance"
tracks INTEGER The total number of tracks in the song (regardless of discs). 1
discs INTEGER The total number of discs in the song. 1

internet_songs

Name Type Description Example
Url * † TEXT The path to where the song is stored "https://www.youtube.com/watch?v=sJXZ9Dok7u8"
Title TEXT The name of the song. "Diamond Heart"
Artists Text The artists that contributed to the song, with the individual entries separated by semicolons. "Alan Walker;Sophia Somajo"
Track INTEGER The track number of this song 1
Disc INTEGER The disc the song is on 1
Duration BIGINT The duration of the song, in milliseconds. 239800
Album Text The name of the album this song is part of. This corresponds to the album column of the internet_albums table. "Diamond Heart - Single"

internet_albums

This table contains a list of all albums that the songs in internet_songs are part of.

Name Type Description Example
album * † TEXT The name of the album "Diamond Heart - Single"
artists TEXT A list of artists that contributed to the album, with individual entries separated by semicolons. "Alan Walker;Sophia Somajo"
year INTEGER The year the album was released. 2018
genres TEXT A list of genres that the song can be assigned to, with individual entries separated by semicolons. "Dance"
tracks INTEGER The total number of tracks in the song (regardless of discs). 1
discs INTEGER The total number of discs in the song. 1

* Cannot be null

† Primary Key

Clone this wiki locally