Reader small image

You're reading from  Managing Multimedia and Unstructured Data in the Oracle Database

Product typeBook
Published inMar 2013
PublisherPackt
ISBN-139781849686921
Edition1st Edition
Right arrow
Author (1)
MARCEL KRATOCHVIL
MARCEL KRATOCHVIL
author image
MARCEL KRATOCHVIL

Marcelle Kratochvil is an accomplished Oracle database administrator and developer. She is CTO of Piction and has designed and developed industry leading software for the management and selling of digital assets. She has also developed an award winning shipping and freight management system, designed and built a booking system, a sport management system, a e-commerce system, social network engine, a reporting engine and numerous search engines. She has been an Oracle beta tester since the original introduction of Oracle Multimedia. She is also a well known presenter at Oracle Conferences and has produced numerous technical podcasts. Born in Australia, she is living in Canberra. She is actively working as a database administrator on supporting a large number of customer sites internationally. She is also campaigning with Oracle to promote the use of storing all data and any data in a database. In her spare time she plays field hockey and does core research in artificial intelligence in database systems. Marcelle has a Bachelor of Science Degree from the Australian National University and majored in computing and mathematics.
Read more about MARCEL KRATOCHVIL

Right arrow

Why use Oracle multimedia and not a blob?


Oracle multimedia is tightly integrated into the database. Application development can be greatly simplified when the images and all associated metadata is stored together in the database. Oracle multimedia uses blobs within its type definition, which can be accessed and used as required. In addition, it supports a variety of methods that simplify the act of loading and manipulating digital images. This is covered in greater detail in Chapter 7, Techniques for Creating a Multimedia Database.

Addressing the concerns

Even though the focus should always be to store the images in the database first, this experience is still to be accepted in the marketplace. The attitude is still to store it in the filesystem. Most management when confronted with the idea of putting images in the database invariably come up with the same set of fears that first appeared over ten years ago when database vendors first tried to push the idea of storing images in the database and failed. What's different now is that the rules have changed, the technology has changed and experience has shown that a lot of the previously raised issues are not valid anymore.

Performance

Isn't it slower to retrieve an image from the database compared to a filesystem?

This might have been true ten years ago on older disk systems, but with improvements in disk technology this issue has subsequently disappeared. Tests have shown that it is just as fast to retrieve an image from a database as it is from a disk filesystem.

In addition, by using optional caching technology, it is possible to cache frequently accessed images thus improving the time to retrieve them.

Fine grained control over where an image is stored and how it's accessed is possible. A thumbnail can be stored on a local disk and cached in the SGA to ensure the fastest possible speed for retrieval. The original can be stored on lower speed disks. The architecture of the Oracle database is one that inherently supports scalability. This makes it simpler to develop applications that load and deliver images.

Oracle's new Securefile Lobs offer speeds nearly twice as fast as previous versions, for loading and retrieval.

Database size

Doesn't it take more storage to put in an image in the database compared to a file system?

Yes it does. The storage format used in the database adds extra overheads to manage locking and to reserve storage for growth. In addition, Oracle puts indexes on images to improve the time it takes to retrieve and manipulate them.

Though there is extra storage required, it is not significant in the overall storage requirements. When tens of thousands of images are stored in the database, the extra required is dwarfed by the overall size of the images. It is also fair to say that disk is cheaper than it once was, and when it comes to database management, the strategy now is to sacrifice storage for performance. When dealing with relational data it is now common practice to add additional indexes and use locally managed tablespaces to improve performance. These extra features come at an additional storage cost. In some cases with data warehouses just for storing relational data, the rule of thumb is to factor in eight times the raw storage to handle all the additional overheads.

So increasing the storage requirements in the database by storing images in it, only ensures that the image data is retrieved optimally and consistently.

Complexity

Isn't it more complicated and time consuming having to put images into the database and retrieve them compared to a filesystem?

This was exactly the same argument used fifteen years ago when relational databases first appeared. But at that time the argument was concerned with storing data in what was known as flat files versus putting it into a relational database. Time has shown that the overheads of putting data into a relational database offer more benefits and ultimately greater control than when storing it in a flat file. The same argument can be applied to images. Yes there is some programming overhead to put them in, but the advantages gained from having them in the database (as explained previously) is greater than when not having them in the database.

So when it comes to storing and managing those digital assets, keep in mind that ultimately it is easier, safer, and better to keep them stored in a database.

Previous PageNext Page
You have been reading a chapter from
Managing Multimedia and Unstructured Data in the Oracle Database
Published in: Mar 2013Publisher: PacktISBN-13: 9781849686921
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
MARCEL KRATOCHVIL

Marcelle Kratochvil is an accomplished Oracle database administrator and developer. She is CTO of Piction and has designed and developed industry leading software for the management and selling of digital assets. She has also developed an award winning shipping and freight management system, designed and built a booking system, a sport management system, a e-commerce system, social network engine, a reporting engine and numerous search engines. She has been an Oracle beta tester since the original introduction of Oracle Multimedia. She is also a well known presenter at Oracle Conferences and has produced numerous technical podcasts. Born in Australia, she is living in Canberra. She is actively working as a database administrator on supporting a large number of customer sites internationally. She is also campaigning with Oracle to promote the use of storing all data and any data in a database. In her spare time she plays field hockey and does core research in artificial intelligence in database systems. Marcelle has a Bachelor of Science Degree from the Australian National University and majored in computing and mathematics.
Read more about MARCEL KRATOCHVIL