Recommendations For An Image Database ? - What is the best way to accomplish this?

Pages: 1, 2
free web hosting
Free Web Hosting > Computers & Tech > Databases

Recommendations For An Image Database ? - What is the best way to accomplish this?

clagnol
I was toying around with the idea of creating a MySQL database for my comic strips. But while reading about image databases, I found that there are (at least) two fundamentally different ways to set up such a database.

Option one is to upload the images into the database using BLOB. This is straight-forward enough.

Option two is to load into the database the locations of the images, elsewhere on the server. Then the database just directs the browser to the images.

I'm sure there are some database experts among you; which method do you think is faster? Which is better, overall?

Reply

miCRoSCoPiC^eaRthLinG
See both of them work almost equally fast. You won't be able to tell the difference between an image being rendered from blob and one that's being loaded from a file. But I tend to prefer the former - i.e. BLOB. It is much easier to handle data & organize them better this way - or so I believe. The file-location based approach works fine too - but I don't really like the idea of having a bunch of scattered files with the database containing their paths. Some of the files can go missing and then all hell breaks loose. In the blob approach, either you whole database crashes due to some freakish reason - or you always have your pictures handy. If you maintain and optimize your tables from time to time then the blob approach is much better I think.

Reply

spacewaste
QUOTE(microscopic^earthling @ Aug 21 2005, 09:50 PM)
See both of them work almost equally fast. You won't be able to tell the difference between an image being rendered from blob and one that's being loaded from a file. But I tend to prefer the former - i.e. BLOB. It is much easier to handle data & organize them better this way - or so I believe. The file-location based approach works fine too - but I don't really like the idea of having a bunch of scattered files with the database containing their paths. Some of the files can go missing and then all hell breaks loose. In the blob approach, either you whole database crashes due to some freakish reason - or you always have your pictures handy. If you maintain and optimize your tables from time to time then the blob approach is much better I think.
*



Blob sounds promising, but I do not like the idea of having everything inside the database...
In my experience I tend to get screwed over more with MYSQL then on the harddrive, so I'd just use MYSQL for the linkage wink.gif. Like Micro said though...Their could become the problem of broken links...OR if you ever had to migrate to a different server...That'd be hell.

Though, I still suggest using the linkage method...Just make sure to keep everything tidy, and to avoid crashes wink.gif

 

 

 


Reply

Hercco
I too would feel more comfortable with images stored as images in the disk and databse containing the url's to them. In case you lose the database you don't lose the images.

But then again BLOBs would be a more elegant and neat way to do it. And not any more insecure if you keep frequent back-ups.

Oh, forgot this. Getting the images from the database (ie. the BLOB method), of course increases the database traffic more. So it might be in place to monitor how much traffic can the database server take compared to the web server.

Reply

unimatrix
Don't store your images in a database. Use method #2 and store them in a directory. One reason is the befored mentioned "when the database crashes you don't loose anything", but if you have a half way busy site, the added data in the database will cause the system to slow down and probably crash real quick, especially if the files are like 150k+ each.

If you must use a database, I would take a serious look at PostgreSQL instead. It may be slower than MySQL for most web requests, but if your going to be transfering lots of data, it will hold up better under load.

Still I recommend not putting image data into a database period and store the images in a folder.

Reply

stusrud
I agree, I would never store my images in a database, there are so many things that can go wrong and "crash" your database. In some cases, you may not even be able to retrieve your lost data. When storing your images in a directory (like I do).

I have had MySql databases crash before, and if you start storing images that are over 100MB each, then your database is going to crash, and you'll wish you would have stored them in a directory.

If you are still stuborn, and want to store them in a database, make sure you have copies of them on your computer or on a CD.

Thanks,
Stusrud sad.gif

Reply

miCRoSCoPiC^eaRthLinG
I'd tend to disagree with the "blob data being more insecure because mysql is crash prone" way of thinking. I've written a school management software which handles well over 4000-5000 images of students+teaches+office staff sent in by various phototaking terminals spread around the campus - all instantly directed to a mysql server over the network (mysql 4.1.11 on RHEL AS 3). The transfer is instantaneous and the feel you get is that this image has been saved on a local drive. The network is a standard ethernet 100-Base-T network wired using CAT-5E UTP. Also whenever any student swipes his/her card at a terminal the image is instantly pulled out of the central server and transmitted to the local swipe terminal. This occurs around 3800times in a span of 30-40 minutes in the early morning checkin hours. Even with such a massive traffic you don't even notice a slight lag. Avg. picture size is 20-30K in jpg format. As long as your network is not suffering from any bottleneck anywhere this isn't a problem at all.

The system's been in place and running for past 7-8 months without any kind of crash whatsoever. For those paranoid about a crash - a very easy way out is to run a parallel mysql replication slave which performs automated incremental/differential backups of the main database whenever changes are made to it -- in effect creating a mirror copy of the master database on another server.

That takes care of the whole issue smile.gif I'm not suggestging this method when you don't have your own hardware setup similar to what I mentioned above - what I want to stress on is that this approach is not as crash-prone as you might care to think.

Reply

yordan
QUOTE(clagnol @ Aug 22 2005, 12:04 AM)
I was toying around with the idea of creating a MySQL database for my comic strips.


Notice from m^e:
Yordan. DON'T use this NOTE tag. This is for use by mods and admins only - to put editing & warning notes on posts.


Your comic strips are static. Once you wrote your history, you finished the work.
So, you don't need a database. A database is useful if you want to remove an image or add one.
For comic strips, you need to have the images on a directory, and create a webpage giving you all the images on the correct order, clicking on one of them to enlarge it.
So, for each comic strip set, you need a software to create the site (I mean a directory with everything in it and an index.html first page). xnview is free and dos the job fast and easy.
And for the next comic strip you have, you add a second directory on your site, and all the job you have to do is creating the very first page redirecting
comic-strip one to directory strip1/index.html
comic-strip two to directory strip2/index.html... etc.

Reply

clagnol
QUOTE(yordan @ Aug 22 2005, 12:13 PM)
Your comic strips are static. Once you wrote your history, you finished the work.
So, you don't need a database. A database is useful if you want to remove an image or add one.
For comic strips, you need to have the images on a directory, and create a webpage giving you all the images on the correct order, clicking on one of them to enlarge it.
So, for each comic strip set, you need a software to create the site (I mean a directory with everything in it and an index.html first page). xnview is free and dos the job fast and easy.
And for the next comic strip you have, you add a second directory on your site, and all the job you have to do is creating the very first page redirecting
comic-strip one to directory strip1/index.html
comic-strip two to directory strip2/index.html... etc.
*



From the XnView website:
QUOTE
XnView is a utility for viewing and converting
graphic files.


I understand what you're saying and I think your solution might work, but XnView looks to me like an application for viewing images on your own computer, unless I'm missing something?

Let me be a little more specific with my needs. My comic strips are different sizes, formats, colors, and shapes (using transparent pixels). What I wish to create is a php page which calls each image from the database (or the link in the database) and displays it in a given area which expands as necessary when the title of the comic is clicked.

I've come to the conclusion that neither frames, nor iframes will be sufficient for giving me the kind of design control that I require. I've already accomplished my goals with javascript, but it is common for people to turn off javascript, so I am looking for a more universal solution. A database is just one possibility I'm exploring.

Here's my comics page, if that would help you understand my intentions better. Keep in mind that these are my first comics.

Reply

evought
QUOTE(clagnol @ Aug 21 2005, 05:04 PM)
I was toying around with the idea of creating a MySQL database for my comic strips. But while reading about image databases, I found that there are (at least) two fundamentally different ways to set up such a database.

Option one is to upload the images into the database using BLOB. This is straight-forward enough.

Option two is to load into the database the locations of the images, elsewhere on the server. Then the database just directs the browser to the images.

I'm sure there are some database experts among you; which method do you think is faster? Which is better, overall?
*



One quick tradeoff to keep in mind. Images in files are easier to bookmark and index. Search engines, for instance, like google's picture search, will probably like you better for having normal files with static, unchanging URLs. On the other hand, for some sites, that convenience is not what you want. If, for instance, you are charging per view or otherwise displaying images to particular account holders, or specifically do not want them indexed outside your site, you do *not* want static URLs and can serve BLOBs in response to POST requests.

This is not absolutely true; it is possible to set up your database app to serve images from blobs in a way which is search/bookmark/index friendly. It is just harder (no GET or POST requests, permanent URLs, etc). Given an equal amount of effort, file access will be easier.

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Recent Queries:-
  1. what is the best way to store uploads ? blob - 72.73 hr back. (1)
  2. best way to store images on a database - 130.47 hr back. (1)
  3. enlarging images using mysql database in php - 140.92 hr back. (1)
  4. free ear images database - 213.33 hr back. (1)
  5. image database mysql - 280.67 hr back. (1)
  6. mysql image database - 329.28 hr back. (1)
  7. upload blob image to mysql - 365.67 hr back. (1)
Similar Topics

Keywords : recommendations, image, database, accomplish

  1. Free Or Opensource Database/schema Browser?
    Alternatives to TOAD or PL/SQL Developer (6)
  2. How To Understand A Database Schema
    A very nice and simple tutorial (4)
    Yesterday while i'm seaching for a data model and database schema at the Library of Free Data
    Models for a new project of a friend of mine i found there this nice and simple tutorial on How to
    Understand a Database Schema . As its name says, this tutorial will help you to better understand a
    Database Schema and covers the following basics topics that every Database Schema must define:
    QUOTE Primary and Foreign Keys. One-to-Many and Many-to-Many Relationships. Inheritance.
    "Rabbit's Ears", (Recursive relationships). The Scope of this tutorial is ....
  3. Best Database
    (13)
    What is the best free database if some one trying built a social networking website? And how to
    operate it with dreamweaver 8?....
  4. Some Useful Database Links.
    (7)
    I thought I would take a moment to point the users here to some of the database resources available
    for reference and learning. First I will start with actually designing the database. This site by
    R937 covers the basics of database design. The author is professional database guru and a frequent
    helper at the at DB forums listed below. The Library of Free Data Models is an excellent
    resource for finding data models for projects you may have or as examples of well put together data
    models. With around 500 data models the chances are you find something at least cl....
  5. Database Access On Remote Server W/jsp
    (0)
    Hello: I am new to JAVA and server-side applications and have a dumb question. I have set up
    Tomcat on my machine and created a JSP program to query an Access database using a DSN-Less
    connection. If I publish the page to a webserver and include the .MDB file will it work? I'm
    not sure exactly what needs to be packaged with my Java application to make it work. Since I
    don't have a remote server that supports .jsp I cannot really test it. I'm assuming that
    JDBC driver would be bundled with my site but not sure. Thanks!....
  6. Space Needed For Database
    (10)
    Iam assuming the information in the databases i will create will be stored in the 500 MB space i
    get, but since 500MB isn't enough iam wondering if you guys can tell me how much bytes the
    following take: Varchar(x),Tinyint,Text,date,smallint,mediumint,bigint,float.... And the rest
    present when you add/edit a row in a table. Also what are the ranges of tinyint,smallint,mediumint
    and big int....
  7. Mysql Database Entry By Excel Sheets
    (2)
    Hello .. I would like to ask if i can use use Microsoft excel files in order to make entries to
    mysql database. Thanks....
  8. Mysql Database Management
    (1)
    Hi i am new, I have a problem in understanding the query decomposition in D-DB. Can anyone help me
    to understand the first question of the exercise 25.21 of Elmasri-Navath 4th edition? Consider the
    following relations: BOOKS (Book#, Primary_author, Topic, Total_stock, $price) BOOKSTORE (Store#,
    City, State, Zip, Inventory_value) STOCK (Store#, Book#, Qty) Consider a distributed database for a
    bookstore chain called National Books with 3 sites called EAST, MIDDLE, and WEST. Consider that
    BOOKS are fragmented by $price amounts into: B1:BOOK1:up to $20. B2:BOOK2:from ....
  9. Accessing Ms Access Database From A Centralized Location?
    (5)
    Hi I am a manager at a trading/wholesaling company (and have no programming background). I
    customized the Northwind sample access database to make invoices and keep accounts for my company.
    We now opening another office at a distant location. So, the order entry will be done at two
    points(we plan to use the same Access database). I am not able to figure out how to access the same
    MS Access database from two different location(as LAN can't be used). Moreover, we can't
    afford to pay huge sums to the software developers. Can intranet or uploading the database t....
  10. Integrate Access Database Onto Intranet Site
    Looking to integrate access database into my intranet site (5)
    Hey guys, im new here and am looking for answers /tongue.gif" style="vertical-align:middle"
    emoid=":P" border="0" alt="tongue.gif" /> Firstly, i have designed a database using M$ access, it
    consists of multiple forms which i plan to host on an intranet website, i need to be able to add
    records directly from the form on the intranet website aswell as being able to edit/review current
    entries on forms in the database. My question is, how would i go about integrating these forms onto
    the intranet website? i plan on keeping the database and the intranet site on the same d....
  11. Database
    prblem with it (1)
    i have free script but it is working fine on a lot of sites i tried to use it to my web site ....i
    edit its config.php right and but my database name and my user name and password every thing right
    and when i try to install it it gives me this error can`t connect to database please choose file
    from this mobile.sql can any body help plz coz i tried huderd of times and no thing happend....
  12. Connecting To A Remote Database
    (9)
    I wondered if anyone here can help. I have a database on a remote server (A). I want to access it
    through a php script on a different server C. I have allowed access on (A) in Cpanel - mysql dbases
    - Remote Access by putting the IP address of server C The host of server (A) has also whitelisted
    the IP of server C. Though I am having trouble connecting from server C which is with a different
    webhost. any ideas how to get round this? I have though of SSH forwarding, but I think this can
    only be used to connect a client - e.g. my pc to the remote server A. I do not ha....
  13. Need Help In Database Auto_increment
    (9)
    i am creating a game and i set when someone registers than he gets id...in "extra" i have set it to
    be "auto_increment" but whenever new player signs up he gets number bigger than 210...(my first id
    was 211,next was 212,third was 213,fourth got 214) how to set it to go from 1 to infinite? thnx....
  14. My Sql Database Help?
    (3)
    Ok, i am new at web design, i dont know too much about it... I was working on a website for about
    a month this is what i got, My Web , like i said, i dont know much.. i used FrontPage and did all
    of that, my current host is AFMU which uses MySQL, but the way it is set up I dont know how to
    acquire the URL of the database or any information i dont know what it means at all.. i just want to
    do a simple login feature, i mean this is my first website and i am learning so I think it would be
    a great feature to add in and learn. i can create data bases from there but do n....
  15. Database Size?
    So how big is everybody's MySQL database? (10)
    Well I know that MySQL databases can get rather big, so I was just wondering how big everybodies
    databases were? Do you have really big ones, or are they relatively small? Also what do you store in
    them? (just text, or binary data as well)....
  16. How Many Concurrent Users For Oracle Database?
    This is to analyse and get perfect result for How many concurrent use (1)
    Hi friends, How many concurrent users can practically access the oracle database?
    they say tht the figure is hundreds of thousands users...is there any exact figure? or does the
    number of concurrent users depend on any other factors as wel? I think depend on parameter
    1.session 2.processes session Specific connection of a user to an Oracle instance through a user
    process. A session lasts from the time the user connects until the time the user disconnects or
    exits the database application. Multiple sessions can be created and exist concurrently for ....
  17. Database Programming In Vba 6.0
    (1)
    hi , i need some sample program in database.thanks....
  18. Need Info On Database Programming Courses
    Oracle Database Programming (2)
    I know Database Programming on MS-ACCESS, now i am planning to go for some other Database
    Programming courses, People told me to go for Oracle or VisualAge. Can anyone told me to start with
    which one and how long is the course period and which one is easy and is it similar to ms access or
    somthig different.....
  19. Permission Problem With Mysql Database Creation
    Please Help! (8)
    I seem to have a problem with accessing my database with proper permissions. I have set the my
    database correctly giving my db username all priviliges yet i seem to be unable to even log on with
    this username with a denied access error. Any ideas on resolving this?....
  20. Is It A Good Practice To Store Image Or Other Binary Files Directly In A Mysql Database
    (4)
    Hello to all of you beautifull people out there, I am new to MySQL, i just wanted to know if its a
    good practice to directly store images and other binary files in a MySQL database. Any one with
    help? Thanks....
  21. What Is Maximum Capacity Of Astahost MySQL Database?
    (11)
    I'm sorry about this topic. I'm a new user and my english is not very good. I want to learn
    the max capacity of mysql db.....
  22. Using pbpBB2 And Mediawiki Common Database
    (3)
    I want to host phpbb2 forum and one wiki software (not sure whcih one at this point). Can someone
    help me how to use a common or shared database for both these applications? The user data, login
    could be common on both databases. Any inputs are appreciated. Thanks ....
  23. What Is A Database How Do I Use One?
    : Information about Databases and how to get use them efficiently (7)
    Hello All Let's start off by talking about what a database is and how it would be efficient
    in using it. It wasn't until about a year and half ago now that I was first introduced to this
    new age of Database. I discovered a lot of neat things and even learned about databases the very
    long way. A database is exactly how it sounds its data that has a base. The base being the place
    where you store all your data. If you have ever been to a library perhaps you have used the Index to
    search for an author, this is a database of authors. Ever seen a rolodex on someo....
  24. MySQL Output Database Question
    (18)
    I am new to MySql and have just created a database after using a script. My problem is not the
    script, but what it says about putting it into the output file. I cant figure out the right terms
    to put it in, I keep getting errors. I try using; SELECT*FROM 'database name' WHERE
    'location' but it isnt working. I'm lost with this stuff, I really am. Can someone
    please help me out?....
  25. Database Program With GUI
    (14)
    I am looking for a program to create SQL databases through a GUI to simplify it, the only things i
    can seem to find are command prompt things and i can't work with them. I like MS access and
    would like something similar to that if possible. I am working with windows at the moment can anyone
    recommend a program i can use (preferably free) Many thanks....
  26. The Best Database
    What do you think is the best database? (48)
    Ive been planning to create a online application which requires tons of stuff from database. Ive
    been using interbase, at first it was good but after a month i find it not user friendly at all...
    Its to hard to code in php.. Can any of you guys give me a good database which is easy to use?....
  27. Mirror My MySQL Database To Another Mysql Server
    (4)
    Hi..I want to ask if its possible to automatically mirror my mysql databases into another mysql
    server?or create a small php script to do this? The reason is because, we all know that database is
    very improtant if we have dynamic website. I have my forum hosted and i want to automatically
    mirror this or backup into another mysql server(free). Like in freesql.org. So that im not afraid
    that i forgot to backup my database..also i have one central backup database. Thanks for the
    help..Im looking forward for this posibility.....
  28. Need Advice On Creating Online Music Database
    ps - dont know anything about databases! (6)
    I need to create a database of around 1000 music albums that I can put on my site, with the ability
    to search the database according to several different criteria. Being a complete and total NOOB to
    the world of databases, can anyone point me in the direction of some software that will let me
    create a good-looking and functional database, but that isn't too complicated for me to use?!
    Sounds like a tall order I know, be grateful if anyone can help though. Thanks! Topic edited to
    reflect content better. ....
  29. Embedded Database
    Embedded Data base at client side, (7)
    Hi, Now its the era of Embedded databases, no more db servers, no more host,Because with embedded
    db you can get all those options, what you are used to get with DB Servers. Some of Embedded DB Are
    1) Cloudscape From IBM (NOW Derby from ASF) 2) HSQLDB (OpenSource) and many more Feel the power of
    EDB Cheers Arunkumar.H.G....
  30. phpBB Database Transfer
    Anyone here knows how to? (10)
    Hello, i'm a newbie in using phpBB and I still lack knowledge in mySQL database. How do I
    transfer the datas(users,configs, all of them) contained in my current forum to another one in
    phpBB? I hope someone can help, a short but detailed tutorial would be good. Example is, if I want
    to move to a new host and I want to transfer all the accounts on my old forum to the new one. Thanks
    in advance, hope anyone here knows how to.....

    1. Looking for recommendations, image, database, accomplish






*SIMILAR VIDEOS*
Searching Video's for recommendations, image, database, accomplish
Similar
Free Or Opensource Database/schema Browser? - Alternatives to TOAD or PL/SQL Developer
How To Understand A Database Schema - A very nice and simple tutorial
Best Database
Some Useful Database Links.
Database Access On Remote Server W/jsp
Space Needed For Database
Mysql Database Entry By Excel Sheets
Mysql Database Management
Accessing Ms Access Database From A Centralized Location?
Integrate Access Database Onto Intranet Site - Looking to integrate access database into my intranet site
Database - prblem with it
Connecting To A Remote Database
Need Help In Database Auto_increment
My Sql Database Help?
Database Size? - So how big is everybody's MySQL database?
How Many Concurrent Users For Oracle Database? - This is to analyse and get perfect result for How many concurrent use
Database Programming In Vba 6.0
Need Info On Database Programming Courses - Oracle Database Programming
Permission Problem With Mysql Database Creation - Please Help!
Is It A Good Practice To Store Image Or Other Binary Files Directly In A Mysql Database
What Is Maximum Capacity Of Astahost MySQL Database?
Using pbpBB2 And Mediawiki Common Database
What Is A Database How Do I Use One? - : Information about Databases and how to get use them efficiently
MySQL Output Database Question
Database Program With GUI
The Best Database - What do you think is the best database?
Mirror My MySQL Database To Another Mysql Server
Need Advice On Creating Online Music Database - ps - dont know anything about databases!
Embedded Database - Embedded Data base at client side,
phpBB Database Transfer - Anyone here knows how to?
advertisement




Recommendations For An Image Database ? - What is the best way to accomplish this?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE