We recognize third-party database management applications can provide additional value to our customers. While Engine DJ does not officially support these third-party tools, we have created the following resource to help developers build tools that are compatible and streamlined for the Engine DJ environment.
At Engine DJ, our team is committed to protecting our customers from unexpected behavior. Our hope is that this resource will ensure our customers have a positive experience when using third-party tools with our products.
3rd Party Application Usage Guidelines
3rd Party Applications which make changes to the Engine DJ folder should not be open simultaneously as Engine DJ. This can lead to database corruption.
Developer Guidelines
- All .db files in the Engine Library/Database2 should not have their schema edited. Doing so will cause Engine DJ to refuse to load the database.
- Engine DJ may implement a change in the future that will drop any data which does not conform to our schema.
- If a 3rd party application needs additional data, this should be stored in a separate database. The engine database files should then be attached to this database at runtime. To avoid potential name collisions, this extension database would live in a subfolder of the `Database2` folder.
- To bind your data with Engine data you need to use a primary key from the Engine database as a foreign key in your tables.
- Do not use the key marked as the primary key in our tables for this purpose. Even though they are primary keys from SQLite’s point of view, they are not genuine/natural primary keys from Engine DJ’s business logic point of view.
- If you need to bind data to a track, use pair of Track.{originId, origingDatabaseUuid}, which is a genuine, natural, and persisted combined primary key for Engine.
- If you need to bind extra data to a Playlist, use its path as a genuine natural persisted primary key. The path of a Playlist is an ordered sequence of all parents' playlist titles starting from the root playlist, which has an empty title and ending with the playlist's title. If this definition is unclear, you can look at the PlaylistPath view to get a better understanding
How to attach your database with Engine db?
SQLite supports standard SQL attach database queries. Use these queries to attach the Engine DJ database to your extension database.
ATTACH "~/Music/Engine Library/Database2/m.db?mode=ro" AS Engine |
SELECT Engine.Track.*, YourExtensionTable.* FROM Engine.Track INNER JOIN YourExtensionTable USING (origingDatabaseUuid, originId) |
SELECT Engine.Playlist.*, YourOtherExtensionTable.* FROM Engine.PlaylistPath INNER JOIN Engine.Playlist USING(id) INNER JOIN YourOtherExtensionTable USING(path) |
For any further questions, please email [email protected].