Results 1 to 6 of 6

Thread: Storing Image into database

  1. #1
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Storing Image into database

    Hi..guys.How can I achieve to storing image into database?Is it necessary to create another table or able to mix with a table which store plain data?Thanks..

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

    Default

    You can achieve this by using Binary based data type that are available in modern RDBMS tools like Oracle or MySql; for example BLOB data type.

    You can keep the images as a field in your table, which means a table can have textual based data as well as binary based data.

    But before the storage of images in the database please make sure that the storage won't affect the performance of your application or rather your application needs the database storage.

    As you haven't mentioned your database tool in your posting it is not really simple to comment on the issue

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    dont store the actual image, you should be storing the location of the image, then you can test for existance later.

  4. #4
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by codeexploiter View Post
    You can achieve this by using Binary based data type that are available in modern RDBMS tools like Oracle or MySql; for example BLOB data type.

    You can keep the images as a field in your table, which means a table can have textual based data as well as binary based data.

    But before the storage of images in the database please make sure that the storage won't affect the performance of your application or rather your application needs the database storage.

    As you haven't mentioned your database tool in your posting it is not really simple to comment on the issue

    Thanks for reply.I am using xampp+PHP+MySQL combination

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

  6. #6
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I dont think you should store images in a database becuase it could slow your db down or take alot of memory, it would probably be easier if you just uploadd it to a file and made it so it posted the url into the db..
    Hey new design new look, goto xudas for personal webdsign help.. (:

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
  •