SQLite and plugin Design Question

Discussion in 'Plugin Development' started by Michael Rhodes, Feb 9, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Michael Rhodes

    Hey everyone,

    I am curious what your guys opinion is on using sqlite dbs in your plugin designs.
    I am currently working on a RPG plugin and with that am using a db. Also I am starting to make another plugin, I call it "TotalHealthControl" with that plugin I will allow admins to control everything with regards to health of a player and how damage is dealt and taken.

    I will post more details on that later... My question now is, If I already have a DB for RPGCraft and I plan on making new plugins to enhance the game, would it be ok to make one db file called "tigerstudios.db" for example, and in that add tables for whatever plugin I make. This way I can eliminate multiple db files and keep all my data in one place.

    Keep in mind my plugins will check for this db file, and create if not there. Also I will program my plugins to not rely on each other, so there would be no dependancy issues.

    So, should I do this, or just make a new data folder for each plugin and new DB file for each ? I just think it would be more organized to keep it all together... but I am not overly experienced in this, so I ask you guys for some advice here.

    Also, I do not plan to over do everything with a DB. I will only be using DBs when I feel necessary, and FF when they would be better.

    Thanks for any advice on this topic.
    --- merged: Feb 9, 2011 6:27 PM ---
    No one have any thoughts on this ?
     
  2. How do you use DBs in your plugin??
     
  3. Offline

    JoeMaximum

    I thinks its pretty much useless ... giving the amount of data we normally use in a plugin ... i dont see why people use database ...
     
  4. Offline

    Plague

  5. Offline

    Michael Rhodes

    Ok, I understand both of your posts... And I already read that post. That said, my main plugin IS a rpg plugin and there will be a lot of data per player. I will be using multiple tables to hold data and I think a db is the best option.

    That said, my other plugins are not so large, and do not need a db. I agree that using dbs for everything is over kill.

    So, I will just do the DB for my RPGCraft plugin, and use Flat files for smaller projects
     
  6. Offline

    JoeMaximum

    Database are flatfiles optimized for huge amount of input/output.
    Unless you have like 100000+ records ... wich i doubt, i still dont see the need for a database .., but you can do as you will.
     
  7. Offline

    Michael Rhodes

    I'm sorry, I am not trying to state a debate about database usage. My question, which I regret asking now, was about combining multiple plugins to use the same database.
     
  8. Offline

    croxis

    I very much suggest using one sql DB for your plugin ecosystem, then again I argue that all plugins should be in one DB. This also makes leveraging many-many or many-one relationships more easy.
     
  9. Offline

    Nodren

    I think until an ORM is built into bukkit, there won't be much reason to attempt to combine databases, except for creating more work for yourself.

    for every one of your projects you write the extra code to use the same db, there's another project that doesn't use your db and uses it's own.
     
  10. Offline

    Michael Rhodes

    Oh, I don't write extra code :) I made a "tools" project, and keep all my common code in that :)

    But I see your point.
     
Thread Status:
Not open for further replies.

Share This Page