Solved Best way to store datas

Discussion in 'Plugin Development' started by To175, Dec 27, 2014.

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

    To175

    Hi,
    I want to create a private plugin like xAuth or Authme to store a lot of information about players.
    I need they have 2 passwords in addition to their premium account (don't want brothers access to their account etc...). I need to store all those data : username, pass1, pass2, passpatern, location, fakelocation , ip, timestamp...

    Which is better to use ? MySQL or SQLite ?

    Thanks.
     
  2. Offline

    Skionz

    @To175 Depends, do you have a MySQL database?
     
    Datdenkikniet likes this.
  3. Offline

    mythbusterma

    @To175

    Depends, why aren't you using YAML?
     
  4. Offline

    To175

    Thanks,
    @Skionz I don't understand the question sry
    @mythbusterma Don't understand why are you talking about YAML...
     
  5. Offline

    mythbusterma

    @To175

    Doing this with YAML would be fastest and easiest. Since you don't indicate you'll be needing the information on more than one server, I see no reason to bother with the difficulty of using SQL. Furthermore, this isn't information you would sort over or use by values, so I see no reason to use SQL.

    Also, he means do you have a MySQL server running.
     
  6. Offline

    To175

    "fastest and easiest" with 5000 rows ? I don't think so...
    @mythbusterma

    I still don't understand his question :|
    I'm asking which is better...
     
  7. Offline

    mythbusterma

    @To175

    Oh, I do think so. It will be faster.

    He's implying that a MySQL server is a separate application, which not all server hosts provide, and therefore is more difficult to provide, whereas an SQLite server runs as part of the Bukkit server and is much easier to provide.
     
  8. Offline

    To175

    @mythbusterma
    Why ??

    Ok so I have a website (∞ databases) + my host provider (1 database) @Skionz
     
  9. Offline

    mythbusterma

    @To175

    Why would SQL be faster? Plus, you can spread the load out and use a file for each player, making the FileConfiguration that much faster.
     
  10. Offline

    lukasabc123abc

    I think you shoud go with mysql becuse of these reasons:

    1: i think its a good syntax

    2: if you ever need to get multiple servers or hook it up to a website it will be easy

    3: eny type of editing of the data can be made on the fly with most setups.

    4: if you care about your plugin getting stolen if you hard code the sql details it will be close to imposible using your plugin on there server


    If you need help with sql or need a library feel free to pm me qnd ill link you or help you out.
     
  11. Offline

    TGRHavoc

    1) You do know that SQLite uses the same syntax right?
    2) Fair point
    3) Umm.. Same with any other type of data storage...
    4) You do know that people can reverse engineer plugins and change things in them right? And hard-coding credentials into a plugin is an extremely bad idea..
     
  12. Offline

    lukasabc123abc

    1. yea i know its the same syntax i was just pointing that out becuse the guy before was speaking of YML stuff. and i was camparing yml and sql at that point maby i was not that clear about that sorry.
    3. iv experienced probems with saving data while the server is running might just me me but with sql i have had no probem.
    4. yea i know and i wasent realy thinking while posting that last part becuse the people who get ahold of the plugin will probebly know how to do that too.

    and i have never looked into sqlLite but he has unlimited sql databases i think its realy good to set it up with mysql at the start. if he ever needs to do eny website stuff

    when i said hard code i meant using no config and if you meant that too tell me why you think that? (if its a private plugin)
     
  13. Offline

    To175

    Thanks,
    1: I don't care if it is easy/hard to code and understand
    2: only 1 server
    3: I didn't understand :p
    4: I don't care

    I'm just searching for high and better (faster...) seeking.
    2000 to 5000 players !
     
  14. Offline

    Skionz

    @To175 Creating a file for each player will be the fastest.
     
  15. Offline

    Freack100

    @Skionz
    wouldn't this eat tons of disk space?
     
  16. Offline

    Skionz

    @Freack100 Yep, but he said he was looking for the fastest way.
     
  17. Offline

    Freack100

    @Skionz
    True.

    OFFTOPIC: (dunno if it' really that offtopic)
    Is the speed loss when using MySQL very big? and would the size "compensate" the speed loss?
     
  18. Offline

    To175

    Fastest for me to check if player exist and compare his password etc... top !
    @Skionz but is your system SQLite ? I know this is not MySQL. And I ask for SQLite OR MySQL, nothing else.
    If magic existed, and if I ask SQLite or MySQL, I don't care Magic is faster than the two others I asked for :p

    @Freack100
    You are NOT OFFTOPIC, this is one of my questions.
     
  19. Offline

    Sagacious_Zed Bukkit Docs

    It always depends on the size of your dataset and how often it is modified, and how resilient you want the data. All those attributes have tradeoffs.

    If you database is on a different host, it can take several ticks for the answer to come back from it.
     
  20. Offline

    To175

    It is the same ! My host provider gives a MySQL database and I think I will have ~2000 rows
     
  21. Offline

    mythbusterma

    @To175

    I'm telling you, you have ABSOLUTELY NO REASON TO USE SQL FOR THIS. Use FileConfiguration, even putting it all in one file will be faster. Seriously, I don't get why you're bent on using SQL for this.

    Why are you ignoring all evidence that your solution is slower AND harder to execute upon? Also, just because they gave you the SQL database, doesn't mean it'll be on the same machine. You'll have to ask them about that.

    If you seriously feel for whatever ignorant reason that you need SQL, use SQLite, you don't need the features of MySQL, and connecting to and receiving data from SQLite is faster by its nature, even if the actual queries are slower.


    @Freack100

    Yes, the loss in speed of using MySQL vs. FileConfiguration is about one order of magnitude, usually slower due to poor optimisation of the MySQL code, and must be done asynchronously due to unpredictable network conditions.


    I think he's just oogling SQL like it's some goddess, when really it has nothing to do at all with his use case. He doesn't care that his plugin will likely be unsafe, slow, and cause lag. As long as it uses SQL *drools*
     
  22. Offline

    To175

    I REALLY HAVE TO SAY FAKE ARGUMENTS FOR YOU TO ANSWER TO THE QUESTION AND NOT AN OTHER ONE ??? So I need SQL to DISPLAY ACCOUNTS ON my WEBSITE.
    ARE YOU HAPPY NOW ??? SO STOP CRYING :mad: [tnt] [tnt] [tnt] [flintnsteel][fire]

    HOOMMMGGG he answered :O thanks :)
    LMAO :rolleyes:
     
  23. Offline

    mythbusterma

    @To175

    Why would you need to show someone's password (hopefully hash) on a website? It seems like a bad idea.
     
  24. Offline

    To175

    @mythbusterma WTF x`D

    account
    mail
    user account
    gnueuh
     
Thread Status:
Not open for further replies.

Share This Page