Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Multiple users, multiple images, Efficiency? Brainstorming!
Old 02-23-2010, 04:19 AM Multiple users, multiple images, Efficiency? Brainstorming!
RadGH's Avatar
Skilled Talker

Posts: 76
Name: Radley
Trades: 0
Imagine photobucket/imageshack, you can register and upload photos. I'm making something similar - but with a different objective. I had this before, each user had a folder which the files were dropped into, for example - here are 3 user's with one photo

http://www.website.com/images/Bob/my...01-23-2008.jpg
http://www.website.com/images/Jack/m...01-24-2008.jpg
http://www.website.com/images/Tom/my...01-22-2008.jpg

Then, for the gallery, each time a thumbnail is requested it will be created if not already. If nobody visits your gallery, and you go there, you have to wait for the page to load. I fixed this by automatically doing the thumbnail when you upload... Another performance issue I thought of, I didn't use a database at all. Whenever they request the page, I used a loop to get a list of all the images in the folder and sort by date, then pagination (i think is the term) to show 20 per page. Each page would do this, you could imagine if the server had many visitors this would be a huge waste of performance.

Is there a more efficient way of doing this? I was thinking of a MySQL database to associate different files with different users.


I thought about uploading them to a generic "/images" folder, and add the URL to the MySQL db and put file information there (Filename, size, date, resolution etc). But then it would seem each user needs a separate mysql table. Is this efficient?

Or, I could do the same as above but make ALL images go into the same table, and add the user who owns the image. There is less wasted tables but then there is one huge table - once this reaches a certain size, could I expect performance issues?

What other ways can this be done? How should I handle the thumbnails? What about adding a title/description/tags etc to the image?
RadGH is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Multiple users, multiple images, Efficiency? Brainstorming!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.08077 seconds with 12 queries