Database or File

Results 1 to 10 of 10
  1. #1
    Member Linker is offline
    MemberRank
    Dec 2008 Join Date
    PortugalLocation
    88Posts

    Database or File

    So guys i just want to know what is better to store data database or files.
    I also want to know the pro's and the con's in using either DB or file.

    Thanks


  2. #2
    Now you can tag me! Detox is offline
    MemberRank
    May 2009 Join Date
    NorwayLocation
    1,821Posts

    Re: Database or File

    WTF, what do you mean?

  3. #3
    Infraction Banned BGxApixen is offline
    MemberRank
    May 2009 Join Date
    939Posts

    Re: Database or File

    He wants to know what's better to store Data

    Depends what you want to store

    Want to store records?
    -Database

    Store Codings, etc...
    Files

  4. #4
    Member Linker is offline
    MemberRank
    Dec 2008 Join Date
    PortugalLocation
    88Posts

    Re: Database or File

    I want to store the cluster and it's channel's to a emulator.

  5. #5
    Alpha Member Organic is offline
    MemberRank
    May 2007 Join Date
    2,077Posts

    Re: Database or File

    ini file would work fine for cluster info.

  6. #6
    Member Linker is offline
    MemberRank
    Dec 2008 Join Date
    PortugalLocation
    88Posts

    Re: Database or File

    Could you make me an example of one of those Organic.

    I'm trying to do a flyff emulator in java and i'm using the source from JFlyff from gunner and Frost as a base.

    They use the database to store the Cluster and channels. But one time i was reading a thread in here and they were saying that files are better then the DB i just wanted to know if that is true for everything or only with some cases.

  7. #7
    Account Upgraded | Title Enabled! ryuchao009 is offline
    MemberRank
    Feb 2009 Join Date
    United StatesLocation
    601Posts

    Re: Database or File

    My (limited) understanding is that the Database is more efficient than files in terms of performance. The basic configuration (Ip, database name, database password, those kinds of things) should be stored in a .txt or .ini file, but anything that the user doesn't need to change should be stored in the database, such as clusters (may want to move these to the config file later on), the accounts, characters, inventory, etc...

    The argument I heard was that writing to/from files constantly demands more I/O, thus putting more stress on a system whereas with a database it does not demand as much I/O.

  8. #8
    Alpha Member GlaphanKing is offline
    MemberRank
    Sep 2008 Join Date
    World of MorrowLocation
    2,594Posts

    Re: Database or File

    It really depends on how much capacity you want and how you want it stored. Database may seem efficient, but file storage also has its possibilities.

    Now, in theory, you can allocate a file for each player and store all the data there. However, if you have around 2000+ players it will be a pain to manage unless you can make a manager to help you.

    Try it for yourself and see which one works for you.

    Database

    Pros
    1. Fast and secure way to store the files.
    2. Can hold near limitless users.
    3. programmable stored procedures for quick and easy execution.

    Cons
    1. A bitch to set up if you don't know about xammp, or wammp, or apache.
    2. Must be backed up frequently to prevent rollbacks, hacks, etc.
    3. Need to know how to call it from language of choice.

    File Storage
    Pros
    1. One file per character, central management.
    2. Easy to interact with inside the server.
    3. Near limitless space as needed on the hard drive.

    Cons
    1. May slow down the processes when a lot of users are needed.
    2. Accidental deletion of the file may be a problem.
    3. If hacked, the hackers know where to look for the character files.

    Veteran programmers feel free to add to these. Its right off the top of my head.

  9. #9
    Member Linker is offline
    MemberRank
    Dec 2008 Join Date
    PortugalLocation
    88Posts

    Re: Database or File

    Thanks guys.

  10. #10
    Apprentice tongzaa99 is offline
    MemberRank
    Aug 2009 Join Date
    7Posts

    Re: Database or File

    jaaaaaaaaaaaa



Advertisement