I started this post a month ago, but after Kaj’s discussion on the same topic at the MySQL Camp I figured it was time to post.
I had dinner with a friend recently (a very smart friend), and our conversation lead him to ask “What’s different with MySQL?”. One of the things I tried to describe was the “Pluggable Storage Engine Architecture” (PSE) potential for the future that I expect will set MySQL apart from all other Open Source and even commercial databases.
Here are some details of the example I tried to provide, given somebody who understands enough of the general principles of RDBMS’s.
Consider the ability that information (intelligent data) is available within a Relational Database via the appropriate tools and language (e.g. SQL) but it is not physically constrained to Tables, Columns and Rows of data and an application to manage that data which is the present traditional approach. Let’s use images that you take with your digital camera as an example.
In a typical RDBMS application you would create an application to managed the content of your data, with a number of tables, and links to the images etc. Of course you would need an application as well to both view and manage this information.
What if, you simply pointed your database to a directory of images and then was able to query information such as photos by date, or by size, by album, from a certain location, with given keyword etc. Most of this information about digital photographs is already there. This information is encoded into an Exif format that is embedded within JPEG images.
So what’s missing from this information? Tags and Comments are the most obvious, because this information can’t be determined electronically, this is something that humans do. If you could also embedded this information into an image with a suitable tool then you could be ready to manage your photos.
A further extension would be to have Image Analysis capabilities that enabled you to search for photos that contained the sky, or people, or something that was the color red.
What if in the future, your camera’s had a built in GPS and this information recorded within Exif, and then the ability to extend your output to link to popular on line mapping software such as Google Maps would exist. You could then use your digital camera to track your moves, taking photos that could then plot your path over a holiday, and also enabling location based queries.
It was interesting to postulate what ideas may be possible in the futre. I suspect that it won’t be long before we actually see this. So what are the other potentials that you may not consider. Another example may be a MP3 Dukebox style PSE, managing all the information held with ID tags of MP3 allowing you to do with music what could be done with images.
References
- MySQL 5.1 Manual – 14.1.2. Pluggable Storage Engine Architecture
- MySQL 5.0’s Pluggable Storage Engine Architecture, Part 1: An Overview
- White Paper MySQL 5.0’s Pluggable Storage Engine Architecture
- MySQL 5.0’s Pluggable Storage Engine Architecture Webinar
Exif Example
Here is some example content of Exif using EXIF Tool
./exiftool ~/Desktop/2006_02_23_AirShow/IMG_5966.JPG ExifTool Version Number : 6.50 File Name : IMG_5966.JPG Directory : /home/rbradfor/Desktop/2006_02_23_AirShow File Size : 2 MB File Modification Date/Time : 2006:09:24 17:44:32 File Type : JPEG MIME Type : image/jpeg Make : Canon Camera Model Name : Canon EOS 300D DIGITAL Orientation : Horizontal (normal) X Resolution : 180 Y Resolution : 180 Resolution Unit : inches Modify Date : 2006:02:23 16:01:56 Y Cb Cr Positioning : Centered Exposure Time : 1/320 F Number : 10.0 ISO : 200 Exif Version : 0221 Date/Time Original : 2006:02:23 16:01:56 Create Date : 2006:02:23 16:01:56 Components Configuration : YCbCr Compressed Bits Per Pixel : 3 Shutter Speed Value : 1/320 Aperture Value : 10.0 Max Aperture Value : 3.5 Flash : No Flash Focal Length : 18.0mm Macro Mode : Unknown (0) Self-timer : 0 Quality : Fine Canon Flash Mode : Off Continuous Drive : Single Focus Mode : AI Focus AF Canon Image Size : Large Easy Mode : Manual Digital Zoom : Unknown (-1) Contrast : +1 Saturation : +1 Sharpness : +1 Camera ISO : n/a Metering Mode : Evaluative Focus Range : Not Known AF Point : Manual AF point selection Canon Exposure Mode : Program AE Lens Type : Unknown (-1) Long Focal : 55 Short Focal : 18 Focal Units : 1 Max Aperture : 3.6 Min Aperture : 22 Flash Activity : 0 Flash Bits : (none) Zoom Source Width : 3072 Zoom Target Width : 3072 Color Tone : Normal Focal Plane X Size : 23.22mm Focal Plane Y Size : 15.49mm Auto ISO : 100 Base ISO : 200 Measured EV : 9.00 Target Aperture : 10 Target Exposure Time : 1/318 Exposure Compensation : 0 White Balance : Auto Slow Shutter : None Shot Number In Continuous Burst : 0 Flash Guide Number : 0 Flash Exposure Compensation : 0 Auto Exposure Bracketing : Off AEB Bracket Value : 0 Focus Distance Upper : -0.01 Focus Distance Lower : 5.46 Bulb Duration : 0 Camera Type : EOS Mid-range Auto Rotate : None ND Filter : Unknown (-1) Self-timer 2 : 0 Bracket Mode : Off Bracket Value : 0 Bracket Shot Number : 0 Canon Image Type : IMG:EOS 300D DIGITAL JPEG Canon Firmware Version : Firmware Version 1.1.1 Camera Body No. : 0930402471 Serial Number Format : Format 1 File Number : 159-5966 Owner's Name : Canon Model ID : EOS Digital Rebel / 300D / Kiss Digital Canon File Length : 2387078 WB RGGB Levels Auto : 1726 832 831 948 WB RGGB Levels Daylight : 0 0 0 0 WB RGGB Levels Shade : 0 0 0 0 WB RGGB Levels Cloudy : 0 0 0 0 WB RGGB Levels Tungsten : 0 0 0 0 WB RGGB Levels Fluorescent : 0 0 0 0 WB RGGB Levels Flash : 0 0 0 0 WB RGGB Levels Custom : 0 0 0 0 WB RGGB Levels Kelvin : 0 0 0 0 Color Temperature : 5200 Num AF Points : 7 Canon Image Width : 3072 Canon Image Height : 2048 Canon Image Width As Shot : 3072 Canon Image Height As Shot : 2048 AF Points Used : Mid-left Preview Quality : Normal Preview Image Length : 278318 Preview Image Width : 1536 Preview Image Height : 1024 Preview Image Start : 2108760 Preview Focal Plane X Resolution: 3443.9 Preview Focal Plane Y Resolution: 3442.0 User Comment : Flashpix Version : 0100 Color Space : sRGB Exif Image Width : 3072 Exif Image Length : 2048 Interoperability Index : R98 - DCF basic file (sRGB) Interoperability Version : 0100 Related Image Width : 3072 Related Image Length : 2048 Focal Plane X Resolution : 3443.946 Focal Plane Y Resolution : 3442.017 Focal Plane Resolution Unit : inches Sensing Method : One-chip color area File Source : Digital Camera Custom Rendered : Normal Exposure Mode : Auto Scene Capture Type : Standard Compression : JPEG (old-style) Thumbnail Offset : 2560 Thumbnail Length : 7680 Image Width : 3072 Image Height : 2048 Aperture : 10.0 Drive Mode : Single-frame shooting Flash : Off Image Size : 3072x2048 Lens : 18.0 - 55.0mm Preview Image : (Binary data 278318 bytes, use -b option to extract) Preview Image Size : 1536x1024 Scale Factor To 35mm Equivalent : 1.6 Shooting Mode : Program AE Shutter Speed : 1/320 Thumbnail Image : (Binary data 7680 bytes, use -b option to extract) WB RGGB Levels : 1726 832 831 948 Blue Balance : 1.140108 Circle Of Confusion : 0.019 mm Focal Length : 18.0mm (35mm equivalent: 27.9mm) Hyperfocal Distance : 1.67 m LV : 14.0 Lens : 18.0 - 55.0mm (35mm equivalent: 27.9 - 85.3mm) Red Balance : 2.075767
AndrĂ¡s Kardos says
This idea came up several times in “software history”. For example ODBC had the same potential. You could write drivers for anything. But they did not succeed, for several reasons. One: it was hard to write dirvers, two, ODBC did not and does not handle multi-datasource queries. MySQL’s PSE is better in this regard I guess – you put everithing “under” MySQL, so multi-source queries work. Oracle and DB2 also provide this kind of functionality. The problem here is that this “let’s see everithing as a database” belongs to the ODBC level, and not the database level. MySQL (as a company) could do such an integration layer – extracting the query engine from MySQL (the product). Actually I’m also working on such a software architecture. There are many issues that come up with is you move into this area…