inherit
16205
0
May 4, 2012 21:08:07 GMT -8
Imusion
722
November 2003
imusion
|
Post by Imusion on Jun 28, 2005 14:09:55 GMT -8
Hi,
I have a question regarding server load in respects to using flat file database vs. a mysql database.
I have a member profile thing on my site where the user can change like a background color. Basically I'm having it so the script either opens up a text files with all the members information about what colors they are using then applying them. Or my second method would be to just store that info into a mySQL database then have the script query the database everytime a user visits the page, so it will display the right colors the member has chosen.
I was wondering which method would cause a bigger load on the server, or are both ways find. I'm leaning towards the mySQL database but I'm not sure if everytime a user visits the profile page and querying the data is efficent for the server.
If anyone can give me some insight on which method is more viable or even possibly suggestions on how I would make it more efficent I would appreciate it.
|
|
inherit
EXOH
27575
0
Nov 12, 2007 22:40:30 GMT -8
J. Meeter
i do my crosswords in pen
8,249
July 2004
modernxxromance
|
Post by J. Meeter on Jun 28, 2005 20:17:01 GMT -8
MySQL. Faster and better.
MySQL = more CPU Flat file = more HDD
|
|
Mike
Junior Member
Formerly Mike (mikkeey)
Posts: 360
inherit
37331
0
Aug 8, 2019 8:21:58 GMT -8
Mike
Formerly Mike (mikkeey)
360
February 2005
airtravel
|
Post by Mike on Jun 29, 2005 8:14:34 GMT -8
If you have a MySQL database available, use it. As above, MySQL is alot faster, especially for bigger sites. Here, I posted this one my site awhile ago, for future reference if anybody needs it: [/b] - using a flat file costs practically nothing because data is stored as text files. No software is required other than the program that needs to access the data, usually NotePad.[/ul] [/b] since text files are universally accepted by all server platforms, there is no problem moving your database from one server to another. Not all servers allow MySQL.[/ul] [/b] data in flat files are stored in one straight line and are separated by delimiters.[/ul] Advantages to Database (MySQL):[/b] query language for requesting information from a database. Whenever searches are executed, it results in more efficient (faster) query.[/ul] [/b] relational databases are designed to be able to efficiently handle larger amounts of data compared to flat files.[/ul] [/b] security features such as password and user levels are usually built-in. Database records are also "locked" whenever they are accessed by a user hence preventing data corruption.[/ul][/quote] Good Luck, Mike
|
|
inherit
EXOH
27575
0
Nov 12, 2007 22:40:30 GMT -8
J. Meeter
i do my crosswords in pen
8,249
July 2004
modernxxromance
|
Post by J. Meeter on Jun 29, 2005 8:20:07 GMT -8
You might also find some useful opinions here.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 29, 2005 13:50:09 GMT -8
Hmmm, actually....benchmark tests have shown that there is very little difference between the 2. Flat files were faster when no condition has been set, but for databases where a condition has been set, it proved to be faster, but nothing you would really notice. So for the conclusion, there is no real difference. Use which ever one you feel comfortable with. For me, it's MySQL.
|
|
registrar
inherit
-148595
0
Nov 30, 2024 2:41:47 GMT -8
registrar
0
January 1970
GUEST
|
Post by registrar on Jun 29, 2005 14:22:46 GMT -8
Both are good, but MySQL is easier to handle because with PHPMyAdmin, you can instantly go through everything that is saved in the database Plus MySQL is what I always use
|
|
inherit
The Jedi Master of Proboards PBS Oscars: Most Unique
6777
0
Nov 19, 2012 0:15:08 GMT -8
Tommy Huynh
Coffee isn't my cup of tea.
19,374
January 2003
swg2
|
Post by Tommy Huynh on Jun 29, 2005 20:47:15 GMT -8
Hmm...reading this helped. I plan on doing something that uses a database in PHP so I think I'm going to try to learn both SQL and Flat Files, and use both of them to try out which is easier for me.
|
|
inherit
16205
0
May 4, 2012 21:08:07 GMT -8
Imusion
722
November 2003
imusion
|
Post by Imusion on Jun 29, 2005 21:42:44 GMT -8
Thanks for the responses guys! I was leaning towards mySQL already just needed some reconfirmation. Also now the new way I have this setup it won't query the database as much.
It was intresting to actually find out there wasn't much differnt in terms of speed, I always thought mySQL was faster.
|
|
inherit
41864
0
Jun 19, 2008 15:56:26 GMT -8
Digger3000
140
May 2005
wmdigger3000
|
Post by Digger3000 on Jun 30, 2005 3:53:59 GMT -8
Mysql. The only reason I used flat file was because I didn't know how to use Mysql.
|
|
inherit
Linux & Mac OS X Fanboy
4912
0
Nov 16, 2024 9:17:09 GMT -8
Adam
Think Different
6,352
July 2002
adamb100
|
Post by Adam on Jun 30, 2005 19:17:35 GMT -8
MySQL. It can be hard to do things with Flatfiles that are normally easy with MySQL.
|
|
Lane Rendell
Junior Member
Your personal text will be displayed underneath your avatar.
Posts: 420
inherit
40805
0
Oct 30, 2005 17:13:52 GMT -8
Lane Rendell
Your personal text will be displayed underneath your avatar.
420
May 2005
lane7564
|
Post by Lane Rendell on Jun 30, 2005 19:21:50 GMT -8
MySql Its easier to work with in my opinion. Plus yougotta love PHPmyAdmin.
|
|