<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.mediamonkey.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dazb</id>
	<title>MediaMonkey Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.mediamonkey.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dazb"/>
	<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/Special:Contributions/Dazb"/>
	<updated>2026-05-10T10:49:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://www.mediamonkey.com/wiki/index.php?title=Database_Structure&amp;diff=5201</id>
		<title>Database Structure</title>
		<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/index.php?title=Database_Structure&amp;diff=5201"/>
		<updated>2009-06-18T13:42:12Z</updated>

		<summary type="html">&lt;p&gt;Dazb: /* Note regarding LIKE */ Typo &amp;quot;statemant&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DatabaseTablesList}}&lt;br /&gt;
&lt;br /&gt;
==MediaMonkey 3.0==&lt;br /&gt;
&lt;br /&gt;
== Database type ==&lt;br /&gt;
[http://www.sqlite.org SQLite] version 3&lt;br /&gt;
* Encoding: UTF-16le&lt;br /&gt;
* Text collate IUNICODE (except where indicated with a (*))&lt;br /&gt;
&lt;br /&gt;
== Additions to SQLite ==&lt;br /&gt;
Check out [http://www.sqlite.org/docs.html SQLite documentation]. MediaMonkey adds some more functions that you can use in SQL queries:&lt;br /&gt;
&lt;br /&gt;
=== Collations ===&lt;br /&gt;
* IUNICODE - Unicode language neutral case insensitive (Post [http://www.mediamonkey.com/forum/viewtopic.php?p=127635#127635 1] [http://www.mediamonkey.com/forum/viewtopic.php?p=79915#79915 2] by Jiri with more detail)&lt;br /&gt;
* NUMERICSTRING - Natural song order respecting numbers stored as strings. Useful for Track# and Disc# fields.&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
* HASSUBFOLDERS(string) - Used internally by MediaMonkey.&lt;br /&gt;
* INSTR(string1, string2) - Returns 1-based index of the first occurrence of string2 in string1, if not found 0 is returned. Case sensitive.&lt;br /&gt;
* LIKE(string1, string2) - Used to replace internal SQLite LIKE operator with one that supports Unicode strings. SEE NOTE!&lt;br /&gt;
* NEXTPATHPART(string) - Used internally by MediaMonkey.&lt;br /&gt;
* SIN(number) - Mathematical sinus function.&lt;br /&gt;
* STRICOMPW(string1, string2) - Compares two Unicode strings, case insensitive.&lt;br /&gt;
* UPPERW(string) - Unicode string upper case.&lt;br /&gt;
* GETEXTENSION(string) - Returns the extension from a filename. (Introduced in MM 3.1)&lt;br /&gt;
* SOUNDEX(string) - Returns a four-character string, based on how the word is pronounced in English. Similar spelled names are supposed to returns the same string. (Introduced in MM 3.1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Note regarding LIKE ====&lt;br /&gt;
This MM-specific implementation of LIKE, automatically uses the @-sign as the escape character and it is always applied.&lt;br /&gt;
It means that you need to modify the SearchString to correctly use this function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is one example of an VBScript function which prepares the search string correctly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
Function FixLikeSearchString(Str)&lt;br /&gt;
  Str = Replace(Str,&amp;quot;@&amp;quot;,&amp;quot;@@&amp;quot;)&lt;br /&gt;
  Str = Replace(Str,&amp;quot;_&amp;quot;,&amp;quot;@_&amp;quot;)&lt;br /&gt;
  Str = Replace(Str,&amp;quot;%&amp;quot;,&amp;quot;@%&amp;quot;)&lt;br /&gt;
  Str = Replace(Str,&amp;quot;&#039;&amp;quot;,&amp;quot;&#039;&#039;&amp;quot;) &#039;&amp;lt;--- Single quotes are escaped with another single quote&lt;br /&gt;
  FixLikeSearchString=Str&lt;br /&gt;
End Function&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you for some reason, within an SQL-statement, need to link two fields using LIKE (instead of =) then use this syntax:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
SomeField LIKE REPLACE(REPLACE(REPLACE(SomeOtherField,&#039;@&#039;,&#039;@@&#039;)&#039;_&#039;,&#039;@_&#039;)&#039;%&#039;,&#039;@%&#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Default Mediamonkey 3 Database location ==&lt;br /&gt;
&#039;&#039;&#039;Windows XP:&#039;&#039;&#039; C:\Documents and Settings\&amp;lt;USERNAME&amp;gt;\Local Settings\Application Data\MediaMonkey\MM.DB&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Windows Vista:&#039;&#039;&#039; C:\Users\&amp;lt;USERNAME&amp;gt;\AppData\Local\MediaMonkey\MM.DB&lt;br /&gt;
&lt;br /&gt;
== Default Mediamonkey 2 Database location ==&lt;br /&gt;
My Documents\My Music\Mediamonkey\Mediamonkey.mdb&lt;br /&gt;
&lt;br /&gt;
== Used data types ==&lt;br /&gt;
&#039;&#039;&#039;INTEGER&#039;&#039;&#039; The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;REAL&#039;&#039;&#039; The value is a floating point value, stored as an 8-byte IEEE floating point number.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;TEXT&#039;&#039;&#039; The value is a text string, stored using the database encoding (UTF-16-LE).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure explanation ==&lt;br /&gt;
The most important table is the &#039;&#039;Songs&#039;&#039; table, which is the starting point for all song-specific info. To allow rapid requests, most of the information is present in the table itself, e.g. the Artist name is spelled out.&lt;br /&gt;
The link between table Songs and other tables like Artists, Albums, ... happens with intermediary tables, e.g. ArtistsSongs. This allows us to assign multiple songs to one artist, AND multiple artists to one song.&lt;br /&gt;
&lt;br /&gt;
The database contains custom events, called &amp;quot;triggers&amp;quot;, that are executed when e.g. an artist is assigned to a track. For that example, the trigger will automatically increment the Artists table&#039;s Tracks counter field.&lt;br /&gt;
&lt;br /&gt;
== Database tables ==&lt;br /&gt;
*[[Albums table|Albums]]: Contains all Albums and some Album specific info&lt;br /&gt;
*[[Artists table|Artists]]: Contains all Artists, AlbumArtists, Composers, Conductors and Lyricists with their track count&lt;br /&gt;
*[[ArtistsAlbums table|ArtistsAlbums]]: Specifies the relation between an Album and its AlbumArtist(s)&lt;br /&gt;
*[[ArtistsSongs table|ArtistsSongs]]: Specifies the relation between a Song and its Artist(s), Composer(s), Conductor(s) and Lyricist(s)&lt;br /&gt;
*[[Covers table|Covers]]&lt;br /&gt;
*[[DBInfo table|DBInfo]]&lt;br /&gt;
*[[DeviceFilters table|DeviceFilters]]&lt;br /&gt;
*[[DeviceTracks table|DeviceTracks]]&lt;br /&gt;
*[[Devices table|Devices]]&lt;br /&gt;
*[[Filters table|Filters]]: Contains all Filters/Views configured in MM&lt;br /&gt;
*[[Folders table|Folders]]&lt;br /&gt;
*[[FoldersHier table|FoldersHier]]&lt;br /&gt;
*[[Genres table|Genres]]: Contains all Genres with track Count&lt;br /&gt;
*[[GenresSongs table|GenresSongs]]: Specifies the relation between a Song and its Genre(s)&lt;br /&gt;
*[[LastTreePath table|LastTreePath]]&lt;br /&gt;
*[[Lists table|Lists]]: Contains all Classifications and their sort order in the tree&lt;br /&gt;
*[[ListsSongs table|ListsSongs]]: Specifies the relation between a Song and its various Classifications&lt;br /&gt;
*[[Medias table|Medias]]&lt;br /&gt;
*[[OrganizeRules table|OrganizeRules]]&lt;br /&gt;
*[[PathProcessing table|PathProcessing]]&lt;br /&gt;
*[[Played table|Played]]&lt;br /&gt;
*[[PlaylistSongs table|PlaylistSongs]] Specifies the relation between a Song and what &#039;&#039;&#039;Static Playlist(s)&#039;&#039;&#039; it appears in&lt;br /&gt;
*[[Playlists table|Playlists]] : Contains all Static Playlists and Auto-Playlists&lt;br /&gt;
*[[PodcastDirs table|PodcastDirs]]&lt;br /&gt;
*[[PodcastEpisodes table|PodcastEpisodes]] Specifies the relation between a Song and a Podcast&lt;br /&gt;
*[[Podcasts table|Podcasts]] Specifies podcast subscriptions &lt;br /&gt;
*[[Songs table|Songs]] : Contains all songs with all their properties&lt;br /&gt;
*[[SynchAlbum table|SynchAlbum]]&lt;br /&gt;
*[[SynchArtist table|SynchArtist]]&lt;br /&gt;
*[[SynchLocation table|SynchLocation]]&lt;br /&gt;
*[[SynchPlaylist table|SynchPlaylist]]&lt;br /&gt;
*[[SynchPodcast table|SynchPodcast]]&lt;br /&gt;
&lt;br /&gt;
== Database structure == &lt;br /&gt;
&#039;&#039;(only most important tables)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:MM3DBStructure.PNG|center|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==MediaMonkey v2.5 and lower==&lt;br /&gt;
&lt;br /&gt;
===Database structure===&lt;br /&gt;
[[Image:DatabaseRelationsMM2.gif|center|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AddSongInfo===&lt;br /&gt;
&#039;&#039;Value field is &amp;quot;TextData&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataType&#039;&#039;&#039;&lt;br /&gt;
{| border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || AIF Code || Description&lt;br /&gt;
|-&lt;br /&gt;
| 100 || AIF_COPYRIGHT || Copyright&lt;br /&gt;
|-&lt;br /&gt;
| 101 || AIF_PUBLISHER || Publisher&lt;br /&gt;
|-&lt;br /&gt;
| 102 || AIF_ENCODER || Encoder&lt;br /&gt;
|-&lt;br /&gt;
| 103 || AIF_ENCODEDBY || Encoded By&lt;br /&gt;
|-&lt;br /&gt;
| 200 || AIF_LYRICIST || Lyricist&lt;br /&gt;
|-&lt;br /&gt;
| 201 || AIF_BAND || Band&lt;br /&gt;
|-&lt;br /&gt;
| 202 || AIF_CONDUCTOR || Conductor&lt;br /&gt;
|-&lt;br /&gt;
| 203 || AIF_REMIXER || Remixer&lt;br /&gt;
|-&lt;br /&gt;
| 204 || AIF_INVOLVEDPEOPLE || Involved People&lt;br /&gt;
|-&lt;br /&gt;
| 205 || AIF_MUSICCOMPOSER || (See note)&lt;br /&gt;
|-&lt;br /&gt;
| 300 || AIF_ORIGTITLE || Original Title&lt;br /&gt;
|-&lt;br /&gt;
| 301 || AIF_ORIGARTIST || Original Artist&lt;br /&gt;
|-&lt;br /&gt;
| 302 || AIF_ORIGLYRICIST || Original Lyricist&lt;br /&gt;
|-&lt;br /&gt;
| 400 || AIF_GROUPDESC || &lt;br /&gt;
|-&lt;br /&gt;
| 401 || AIF_SUBTITLE || &lt;br /&gt;
|-&lt;br /&gt;
| 402 || AIF_ISRC || &lt;br /&gt;
|-&lt;br /&gt;
| 500 || AIF_INITIALKEY || &lt;br /&gt;
|-&lt;br /&gt;
| 501 || AIF_LANGUAGE || &lt;br /&gt;
|-&lt;br /&gt;
| 502 || AIF_MEDIATYPE || &lt;br /&gt;
|-&lt;br /&gt;
| 503 || AIF_RATINGSTRING || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || AIF_WEB_COMMERCIAL || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || AIF_WEB_COPYRIGHT || &lt;br /&gt;
|-&lt;br /&gt;
| 1002 || AIF_WEB_FILEPAGE || &lt;br /&gt;
|-&lt;br /&gt;
| 1003 || AIF_WEB_ARTIST || &lt;br /&gt;
|-&lt;br /&gt;
| 1004 || AIF_WEB_SOURCE || &lt;br /&gt;
|-&lt;br /&gt;
| 1005 || AIF_WEB_RADIO || &lt;br /&gt;
|-&lt;br /&gt;
| 1006 || AIF_WEB_PAYMENT || &lt;br /&gt;
|-&lt;br /&gt;
| 1007 || AIF_WEB_PUBLISHER || &lt;br /&gt;
|-&lt;br /&gt;
| 1100 || AIF_WEB_USER || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: Apparently, the value for the composer is stored in the Author field of the Songs table rather than in the AddSongInfo table under MediaMonkey 2.5. The situation in other versions is unknown.&lt;br /&gt;
&lt;br /&gt;
===AddSongInfoInt===&lt;br /&gt;
&#039;&#039;Value field is &amp;quot;IntData&amp;quot;&#039;&#039; (linked to Lists.ID)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataType&#039;&#039;&#039; (partially linked to Lists.IDListType)&lt;br /&gt;
{| border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || AIF Code || Description&lt;br /&gt;
|-&lt;br /&gt;
| 10000 || AIF_ORIGYEAR || Original Year&lt;br /&gt;
|-&lt;br /&gt;
| 10101 || AIF_TEMPO || Tempo&lt;br /&gt;
|-&lt;br /&gt;
| 10102 || AIF_MOOD || Mood&lt;br /&gt;
|-&lt;br /&gt;
| 10103 || AIF_OCCASION || Occasion&lt;br /&gt;
|-&lt;br /&gt;
| 10104 || AIF_QUALITY || Quality&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Memos===&lt;br /&gt;
&#039;&#039;Value field is &amp;quot;MemoText&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MemoType&#039;&#039;&#039;&lt;br /&gt;
{| border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || AIF Code || Description&lt;br /&gt;
|-&lt;br /&gt;
| 20000 || AIF_LYRICS || Lyrics&lt;br /&gt;
|-&lt;br /&gt;
| 20001 || AIF_COMMENT || Comment&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dazb</name></author>
	</entry>
</feed>