Topic: What do you guys think it's better, store files in MySQL or physical folders? (Read 803 times)
OMG!I am geek
Gender:
Posts: 55
366 credits Members referred : 0
my day will come..
« on: Nov 02, 2006, 02:49:59 AM »
I'm wondering wether to store files uploaded by users into MySQL or create on-the-fly folders for each user everytime they upload a file. I guess it's better to store them into folders and not into MySQL but I don't know how convenient would be to use MySQL since I've never tryied to store files into it. What it's your advise?
p.s.- users files won't be larger than 1024 or 2048 kilobytes.
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Nov 02, 2006, 10:05:07 AM »
Store very small files(some KB) in a database (only if you need this) and forget it to two store bigger files
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8037
41179 credits Members referred : 3
« Reply #3 on: Nov 02, 2006, 10:14:41 AM »
I agree that you should store files to the filesystem, except if you have a system that has really high traffic, so you need database to make the load faster (of course this would be true if you had a very fast DB server, otherwise it wouldn't really help)
To make this you will need to use commands like mkdir() and fopen.
OMG!I am geek
Gender:
Posts: 55
366 credits Members referred : 0
my day will come..
« Reply #4 on: Nov 02, 2006, 12:46:27 PM »
haha, naw Olaf. it's also a Japanesse cartoon though, it was called SuperChampions in México. Captain Tsubasa in Japan, probably in USA too. The guy in the avatar is Bruce Harper, mid-fielder that looks like me (because of the crew cut haha).
I think I'll store the files in folders but right now I'm too tired to do the coding. I've been on the computer since monday and only got out to play some soccer and smoke a little with my friends. I'll get some sleep for now and tomorrow I'll try to do this coding to upload files. Peace man, see ya in a few hours.
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
It's time to use PHP5!
Re: What do you guys think it's better, store files in MySQL or physical folders
haha, naw Olaf. it's also a Japanesse cartoon though, it was called SuperChampions in México. Captain Tsubasa in Japan, probably in USA too. The guy in the avatar is Bruce Harper, mid-fielder that looks like me (because of the crew cut haha).
I think I'll store the files in folders but right now I'm too tired to do the coding. I've been on the computer since monday and only got out to play some soccer and smoke a little with my friends. I'll get some sleep for now and tomorrow I'll try to do this coding to upload files. Peace man, see ya in a few hours.
if you store images in a database you need to upload the data too
I think they show the cartoons here too (it's about some futuristic football play right?)
OMG!I am geek
Gender:
Posts: 55
366 credits Members referred : 0
my day will come..
« Reply #6 on: Nov 03, 2006, 12:12:17 AM »
Well, there are like 2 or 3 'versions' of Captain Tsubasa. I don't really know if one it's futuristic but yeah, it's about Soccer. It was such a big thing back in 1994 because of the USA World Cup and everything, you know. I live at 2 hours from Texas and when you had the World Cup we were also affected in a good way. So TV started showing this cartoon at the same time than the World Cup and it was a big success.
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4630