Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mySQL vs SQLite3

Comments in 'Plugin Development' started by Tethered_, Dec 1, 2014.

  1. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Between mySQL and SQLite3, which is better to use and why?
  2. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    SQLite3
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    SQLite3 can be used directly and is most convenient for server owners. The construction of SQLite3 is kind of like Config. However, SQLite3, when used in memory to manage in-memory objects instead of saving data (new \SQLite3(":memory:")), it has no alternatives.

    MySQL requires the server owner to setup a MySQL server and enter the host, username, password, port and schema name into the config. However, if it is connected with localhost, it has almost latency caused by network, and its data management is run at another process so PocketMine has less things to run.

    If you are making a plugin, you should let the server owner choose between the two.
  4. Exxarion
    Offline

    Exxarion Active Member Plugin Developer

    Joined:
    Jan 5, 2014
    Posts:
    242
    Plugins:
    1
    Minecraft User:
    Notch
    I actually use MySQL3 for all my plugins, because it is easier to use and a lot less work than MySQL.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    In fact, SQLite3 and MySQL are similar, but you have to think about how to minimize the number of requests in MySQL because it will get very slow if you don't.
  6. Exxarion
    Offline

    Exxarion Active Member Plugin Developer

    Joined:
    Jan 5, 2014
    Posts:
    242
    Plugins:
    1
    Minecraft User:
    Notch
    Well yeah.
  7. codmadnesspro
    Offline

    codmadnesspro Notable Member Plugin Developer

    Joined:
    Sep 11, 2013
    Posts:
    551
    Plugins:
    1
    Minecraft User:
    Codmadnesspro
    Mysql is better because if you have multiple servers you can sync simpleauth or a stats plugin to all those servers to one database :)
    PEMapModder likes this.
  8. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,196
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    MySQL calls is only great if both PocketMine and MySQL Server is hosted in one machine otherwise its crap.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If you use MySQL wisely, it isn't. You think it's crap most likely because you don't even try to minimize the connection.
  10. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,196
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    remote calls are slow.
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Then try not to call. Try to use PHP memory as the database and the MySQL server only as an image of your PHP memory.
    Falk likes this.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    And when will you start working on StatsCore? I don't want to be the only one contributing in a team project.
  13. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,196
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    thats why i said its crap xD

    after im done with iMCPE stuff, ill continue.
  14. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    Can I see the github link to that?
  15. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,196
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    codmadnesspro likes this.

Share This Page

Advertisement