Results 1 to 6 of 6

Thread: mysql or files

  1. #1

    Lightbulb mysql or files

    Im going to be making forums in the future and I was wondering what would be the best place to store the design templates for the forums? in a mysql database or in files?
    -Tyler

    http://www.beauxbatonsonline.com
    [email protected]

  2. #2
    Join Date
    Jan 2003
    Posts
    1,715
    Files. Unless you use the manipulation capabilities of a database (sorting, indexing, joining), files will be faster and, in the case of HTML/XML work, easier to maintain.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

  3. #3
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    417
    mySQL is just a database program using its own way to store data in a flat file, like MS Excel, the core of every database is flat files

    if your familiar with disk seek and indexing, you will be able to make a flat file database whcih outperforms mySQL

  4. #4
    Join Date
    May 2004
    Location
    Leiden, The Netherlands
    Posts
    8
    I would recommend in files because loading all code from a mysql database will dramatically increase your CPU/memory load

  5. #5
    Join Date
    Dec 2002
    Location
    Fort Worth
    Posts
    429
    Originally posted by lwknet
    mySQL is just a database program using its own way to store data in a flat file, like MS Excel, the core of every database is flat files

    if your familiar with disk seek and indexing, you will be able to make a flat file database whcih outperforms mySQL
    Great advice: "Roll your own database".

    But you forgot to advise the OP to roll his own operating system first

  6. #6
    Join Date
    Oct 2002
    Location
    Canada
    Posts
    3,100
    Originally posted by lwknet
    mySQL is just a database program using its own way to store data in a flat file, like MS Excel, the core of every database is flat files

    if your familiar with disk seek and indexing, you will be able to make a flat file database whcih outperforms mySQL
    I assume you are talking about file seek. That and file locking are only part of the problem. Mysql also does very good job of caching queries and results, which greatly speeds up perfomance.

    To the original poster, If you are having fun with what you are doing, do both. Set the template class to retrieve template from database or from flat file, based on some config setting. That is only way to find out which is better for you and it should not be too hard to implement. Some considerations that come to my mind are related to editing and managing those files. Database stored templates need to be edited through online editor, while file templates can be editied any way you like, With file templates you can have issues with premission (ie, have them chmoded to 666 which is not preety) and with database you can avoid that problem. Choices, choices.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •