NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
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
Read by 2,450 user(s) | Add comment | Link to this article TWEET THIS


Article rating:
Good (3.2/5) 7 vote(s)    

Subscribe to news | Print article | Send to friend

© Copyright 2001-2009 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




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


MORE RELATED ARTICLES:


Advantages of Images in Portable Network Graphics (PNG) Format

Web Images Optimization Tips

Automatically Create HTML Photo Albums with Image Thumbnailer and Converter Software

Organize Your Website Directory Structure Efficiently

How to Prepare Scanned Images for Web Publishing

Free Image Galleries

Reduce Bandwidth Consumption Using HTTP Compression

Site Visitors Return

An Efficient Way to Edit, Share and Publish Presentations Online

Live Interaction with Any Web Site Design

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:

 




Windows tabGames tabDrivers tabMac tabLinux tabScripts tabMobile tabHandheld tabGadgets tabNews tab

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