NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
Home / News / Webmaster / Tips and Tricks

Tips and Tricks


Organize Your Images in a MySQL Database

Tips for creation of a MySQL database with images

By Catalin Bocanu, Web News Editor

14th of November 2007, 18:51 GMT

Adjust text size:


Management of MySQL Databases with phpMyAdmin
Enlarge picture
Image galleries can help you organize your digital pictures in order to publish them or for indexing purposes. But the best efficient method to manage digital images is to include them in a database. You can choose any type of database to create an image database.

MySQL databases are widely used for many purposes, especially as web applications backend. This type of database can support queries made with any server side
programming language, such as PHP, ASP, JSP. First, you must define the database table structure, with the help of a MySQL administration tool. The most popular web browser based MySQL administration tool is phpMyAdmin.

In a previous article I described the installation of phpMyAdmin and the basic steps needed to make a simple MySQL database. After you create a new database, named for example Imagedatabase, you must define tables in which you will introduce new records containing your images. Every new table you will define in phpMyAdmin application must contain the same number of fields (displayed as rows).

The table will represent a certain category for your images and as a consequence, the name should be chosen carefully. For example, let's name the first table MyFirstCategory. For the beginning, let's select only three fields for the new table. After you press the OK button, in the new window, you must define the table fields' properties. For the first field, the name must be set as ID, Type - INT, Extra - auto_increment, the second field will be named Image Title, Type - Varchar, Length - 30, and the last one will be called Image, Type - Blob. The field named ID must be set as primary key, otherwise you will receive an error message.

After you finished to create the first table, copy the SQL corresponding code and then perform the operation again, but this time you change only the table name, in order to define as many categories as you need. Now you are ready to populate the database tables. Select insert new record, then you must operate only on the fields named Title and Image, because the ID will autoincrement itself on every new added record. The Blob type will allow you to insert the images in the database table.

After you finish populating the database, you will be able to manage records with phpMyAdmin administration tool or with another browser-based application that will allow you to browse, edit, add or delete records.

TAGS:

Image Database | Database Management | MySQL Databases | Images Organizer | Images Indexing Tool


Rating:
Good (3.6/5) 6 vote(s) so far    

Read by 1,105 user(s) | Add comment | Link to this article
Subscribe to news | Print article | Send to friend

© Copyright 2001-2008 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




Today's News
| Yesterday's News | News Archive


MORE RELATED ARTICLES:


Web Images Optimization Tips

Free Image Galleries

How to Prepare Scanned Images for Web Publishing

Advantages of Images in Portable Network Graphics (PNG) Format

Site Visitors Return

Live Interaction with Any Web Site Design

An Efficient Way to Edit, Share and Publish Presentations Online

Organize Your Website Directory Structure Efficiently

Automatically Create HTML Photo Albums with Image Thumbnailer and Converter Software

Reduce Bandwidth Consumption Using HTTP Compression

User opinions:

No user comments yet.
Be the first to express your opinion using the form below!

Share your opinion:

Your Name:
Your Email Address:
(will not be used for commercial purposes)
Solve this to prove you're not a bot: =
Your review/opinion:

 






SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM