Database Structure

As mentioned before I use SQLite to store the properties of the files. The database structure is very simply. Only a few tables are necessary. The tables are described in alphabetic order:

T_CATALOGITEM: Contains all properties of the analyzed songs

CREATE TABLE "TCATALOGITEM" ("ID" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,"ROOTFOLDERID" INTEGER NOT NULL DEFAULT (0) ,"PATHFILENAME" TEXT NOT NULL ,"ARTIST" TEXT,"ALBUM" TEXT,"TITLE" TEXT, "GENRE" TEXT, "TRACK" INTEGER NOT NULL DEFAULT(0), "YEAR" INTEGER NOT NULL DEFAULT(0), "BEATSPERMINUTE" INTEGER NOT NULL DEFAULT(0), "SAMPLERATE" INTEGER NOT NULL DEFAULT (0) ,"BITRATE" INTEGER NOT NULL DEFAULT (0),"DURATION" DOUBLE NOT NULL DEFAULT (0),"MODDAT" DATETIME, "ALBUMART" BLOB, "CUEINBYTES" INTEGER NOT NULL DEFAULT(0), "CUEOUTBYTES" INTEGER NOT NULL DEFAULT(0), "GAINFACTOR" FLOAT NOT NULL DEFAULT(0))

T_PLAYLIST: Contains all properties of the defined playlists.

CREATE TABLE "T_PLAYLIST" ("ID" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "CAPTION" TEXT NOT NULL )

T_PLAYLISTITEM: Contains all related catalog items of playlists

CREATE TABLE "TPLAYLISTITEM" ("ID" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "PLAYLISTID" INTEGER NOT NULL, "CATALOGITEM_ID" INTEGER NOT NULL )

T_ROOTFOLDER: Contains the catalogs of the CatalogItems.

CREATE TABLE "T_ROOTFOLDER" ("ID" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "CAPTION" TEXT NOT NULL , "PATH" TEXT NOT NULL )

You will find the database file as “DJP.sqlite” in the bin folder.

Last edited May 13, 2013 at 3:29 PM by InneHo, version 2

Comments

No comments yet.