Pls answer my question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Pls answer my question

  1. #1
    max Guest

    Pls answer my question


    how other companies manage their product photo library?
    how to provide photo for each of the more than 100,000 products in our database?

  2. #2
    MarkN Guest

    Re: Pls answer my question


    Manage the photos in the file system and put the filename or link in the database.

    "max" <newxam@yahoo.com> wrote:
    >
    >how other companies manage their product photo library?
    >how to provide photo for each of the more than 100,000 products in our database?



  3. #3
    Arthur Wood Guest

    Re: Pls answer my question


    and to re-inforce what Mark has said, don't even think about putting the ACTUAL
    photo files IN the database. Keep the actual files with the photos on DISK,
    and store the PATH to the phot in the database. That way, you can update
    the photo (using the same file name for the NEW phot), without needing to
    change the database in any way.

    Arthur Wood


    "MarkN" <m@n.com> wrote:
    >
    >Manage the photos in the file system and put the filename or link in the

    database.
    >
    >"max" <newxam@yahoo.com> wrote:
    >>
    >>how other companies manage their product photo library?
    >>how to provide photo for each of the more than 100,000 products in our

    database?
    >



  4. #4
    Paul J Guest

    Re: Pls answer my question


    ... furthermore, store a "root" photo path in a field in a single-record table
    in your database (I usually create a "config" table for this, so "PhotoRootPath"
    would be the field in this case) and then just store relative paths to your
    photos instead of fully-qualified paths. This makes it MUCH MORE PORTABLE
    if the photos move to another location.

    Paul Johnston

    "Arthur Wood" <wooda@nospam.com> wrote:
    >
    >and to re-inforce what Mark has said, don't even think about putting the

    ACTUAL
    >photo files IN the database. Keep the actual files with the photos on DISK,
    >and store the PATH to the phot in the database. That way, you can update
    >the photo (using the same file name for the NEW phot), without needing to
    >change the database in any way.
    >
    >Arthur Wood
    >
    >
    >"MarkN" <m@n.com> wrote:
    >>
    >>Manage the photos in the file system and put the filename or link in the

    >database.
    >>
    >>"max" <newxam@yahoo.com> wrote:
    >>>
    >>>how other companies manage their product photo library?
    >>>how to provide photo for each of the more than 100,000 products in our

    >database?
    >>

    >



  5. #5
    Jan van der Goes Guest

    Re: Pls answer my question


    ... furthermore. Store the info about the file in a table with some kind of
    integer (autoincrement) primary key. Use the key as filename for your photo.
    To avoid 100.000 files in one subdirectory, do some math on the key to get
    a sub-dir relative to the Root. E.g. divide by 100. So for photo 50309 your
    subdir become Interger(50309/100) = 503. The full path to you photo become
    \root\503\50309.jpg

    Jan van der Goes

    "Paul J" <pjohnston@NOlwcSPAMb.ca> wrote:
    >
    >... furthermore, store a "root" photo path in a field in a single-record

    table
    >in your database (I usually create a "config" table for this, so "PhotoRootPath"
    >would be the field in this case) and then just store relative paths to your
    >photos instead of fully-qualified paths. This makes it MUCH MORE PORTABLE
    >if the photos move to another location.
    >
    >Paul Johnston
    >
    >"Arthur Wood" <wooda@nospam.com> wrote:
    >>
    >>and to re-inforce what Mark has said, don't even think about putting the

    >ACTUAL
    >>photo files IN the database. Keep the actual files with the photos on

    DISK,
    >>and store the PATH to the phot in the database. That way, you can update
    >>the photo (using the same file name for the NEW phot), without needing

    to
    >>change the database in any way.
    >>
    >>Arthur Wood
    >>
    >>
    >>"MarkN" <m@n.com> wrote:
    >>>
    >>>Manage the photos in the file system and put the filename or link in the

    >>database.
    >>>
    >>>"max" <newxam@yahoo.com> wrote:
    >>>>
    >>>>how other companies manage their product photo library?
    >>>>how to provide photo for each of the more than 100,000 products in our

    >>database?
    >>>

    >>

    >



  6. #6
    binod Guest

    Re: Pls answer my question


    "MarkN" <m@n.com> wrote:
    >
    >Manage the photos in the file system and put the filename or link in the

    database.
    >
    >"max" <newxam@yahoo.com> wrote:
    >>
    >>how other companies manage their product photo library?
    >>how to provide photo for each of the more than 100,000 products in our

    database?
    >



    simply keep the images in a folder and specify the path somewhere in your
    seeting tables,,so that u can read the path of you photos.
    In the databse simply save the photo name in the format of the product id
    "like = PO00123.gpg" so while displaying read the path from the setting table
    from the database and the photo name from the product table , joing then
    so u get the actual path of your photo and display it.
    doing so your database size will not grow big as you are storing yor photo
    in a seperate place....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center