Results 1 to 6 of 6

Thread: Photo database

  1. #1
    Join Date
    Sep 2006
    Location
    Liverpool UK
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Photo database

    Hi all,

    Am new to web design and getting along very nicely (well, on my 4th site, I code by hand, use pure external css to layout pages and how they look, and have managed to work it for most browsers, self taught in 6 months so doing ok...fast learner!!).

    I have built a site for a friend for his photography business. He has requested he would like to be able to put a clients photos online for them to view only their images and no-one else to get access.

    1st of all, i've no-experience in databases, so how difficult would it be to do one, and give him the power to apply his pictures for each client and upload them or whatever. He is also talking about making them log in so they can view their images only and not have them open for everyone else to view.

    How could i achieve something like this.

    geoffb

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,625
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Thumbs up

    Yes storing of images using databases is possible which i think an efficient way of storing images.

    Most of the new generation database packages supports some data types BLOB - Binary Large Object for this purpose.

    If you are intending to do this job with PHP and MySQL, then please checkout the following links which will give some fairly good idea about handling insertion and retrieval of images in database.

    Using a user management mechanism, you can restrict the user from viewing other members images also.

    http://www.developerfusion.co.uk/show/2667/

    http://codewalkers.com/tutorials/35/1.html

    http://www.wellho.net/solutions/php-...-retreive.html

  3. #3
    Join Date
    Nov 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    although you certainly can store the image in the database, and if you talk to 10 different programmers you will probably come up with 10 different answers.

    a technique that I use [dailiy] is to store the filename in the database and then just hit the database retieving the filename and then write the img tag. This is probably your best bet.

  4. #4
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I would agree with penguin. I also just store the path. It makes it a lot easier to manage plus the database size doesn't get out of hand.

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,625
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Quote Originally Posted by mrwebslinger
    I would agree with penguin. I also just store the path. It makes it a lot easier to manage plus the database size doesn't get out of hand.
    This method is very simple considered to the method in which we store the images in the database.

    But i think if large number of images are involved then it would be better to store them in database.

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    No... the more images the WORSE it is to store them in the database.
    It will slow things down and just become a mess.
    Store the URL... please...
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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