SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old January 23rd, 2003, 05:52 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 81 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 7
directory or DB ??

Hi,


which one is a better way to store files submitted by users ? upload and store in a directory or as a blob field in database ?

thanks,
__________________
Rathaur
======================
Knowledge is Power

Reply With Quote
  #2  
Old January 23rd, 2003, 07:17 PM
Jeb. Jeb. is offline
"l33t? What's l33t?"
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 Jeb. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Jeb.
In a directory - it becomes easier to manage. Not only that, if your database dies, you still have access to the files.

A lot of forums store their avatars in the database, and this is alright because avatars are quite small.
__________________
Jeb.

AIM: JebediahMc - PM Me - E-Mail Me


Reply With Quote
  #3  
Old January 24th, 2003, 08:19 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 81 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 7
How abt user submitted files, that could be in any format, whether a .ppt , .xls, .html, .doc is it still suitable to use DB or should I use directoris ? for example if a file is 400KB, 10 files will cost me 4M and 100 files 40M . in case of DB, will blob will reduce the amount of memory that used to store the files ?

thanks, appreciate you guys suggestion ..

Reply With Quote
  #4  
Old January 26th, 2003, 02:51 AM
Jeb. Jeb. is offline
"l33t? What's l33t?"
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 Jeb. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Jeb.
No, you still need the same amount of space regardless of how you store it: it all comes down to the number of bytes.

You could gzcompress the files first, and then store them on your filesystem - then gzuncompress them when somebody calls for them.

But you'll be better off going with flat files for something like that. You don't want to make too many unnecessary database calls.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > directory or DB ??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway