Database for MP2 (1 Viewer)

Jayakanthan

Portal Member
January 16, 2014
11
1
50
Home Country
Sri Lanka Sri Lanka
I installed MP2 Alpha 4 to my Windows 8.1 PC and found some .sql scripts under C:\Program Files (x86)\Team MediaPortal\MP2-Server\Scripts folder

ClientManagerxxx.sql
ClientManager-createxxx.sql
MediaLibraryxxx.sql
MediaLibrary-createxxx.sql
MediaPortal-Basicxxx.sql
UserProfileDataManagerxxx.sql

I also downloaded the Source and trying to to run with MySQL Database using VS2013. How can I find the complete mySQL Database for MP2. Or Can I use those .sql files to get MySQL database tables.

Thanks
 

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    MySQL is not necessary as the default SQLite DB is a lot faster than MySQL. But if you want MySQL you can use it. You need to replace the "SQLiteDatabase" plugin in your MP2 Server by "MySQLDatabase" Plugin from here:
    https://forum.team-mediaportal.com/...-size-limit-for-your-mp2-medialibrary.114158/
    But as told, SQLite is a lot easier to handle (no extra program to be installed/runed) and a lot faster. That's why it's default. The MYSQL plugin isn't developed with the same speed, so I'm not sure if it's compatible with latest MP2 any longer. But there is no harm in trying it. Just keep the original SQLite plugin on a safe place so you can change it back if needed.
     

    Jayakanthan

    Portal Member
    January 16, 2014
    11
    1
    50
    Home Country
    Sri Lanka Sri Lanka
    Hi Thanks for your reply,

    I placed the SQLite plugin and the Server is working. What I want to know is how I can open the SLQLite Database and tables separately and update using SQLite Studio.
    Where the SQLite files are stored in the Solution? I dont find any Datastore file. I want to get list of all the tables of the Schema and undestande. So that I can create another Plugin for MSSQL Server 2008.

    Please advice
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Where the SQLite files are stored in the Solution?
    If you don't change default path the datastore.s3db file is in "c:\ProgramData\Team MediaPortal\MP2-Server\Database\". It's a standard SQLite DB file and can be opened with all SQLite tools.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Hi Jayakanthan
    and thanks for testing MP2!
    Making MP2 compatible with another database is (at least in general) fairly easy. You need to implement two interfaces: ISQLDatabase and ITransaction (same link as before). You need to compile these classes into one DLL and register the database with MP2 by way of a plugin.xml file.
    If you want to see this implemented, it is probably the best idea to start with the implementation for the MSSQLCE database, which is a fairly basic implementation of these interfaces. The implementation of our current SQLite Database plugin has already some performance tweaks and settings, which may distract at least at first glance from the really important things. Both of these database are, however, embedded databases. If you want to implement MS SQL Server support, our current MySQL database plugin may also give you some hints on the particularities with server databases.
    If you need any further help, just let me know!
    Michael
     

    Users who are viewing this thread

    Top Bottom