Modern computer applications use enormous volumes of rich data like video, still images, and text, as well as more conventional numeric and character data. Managing huge volumes of such diverse data requires a database. Content queries, such as 'find me the color images with red components higher than this threshold,' require that the database system be able to apply the qualification directly. Relational database systems that store images as untyped binary large objects (BLOBS) cannot apply qualifications like this, because the database system does not understand the contents of the BLOB. Object-Relational Database Management Systems (ORDBMS), on the other hand, allow users to extend the set of types and functions known to the database system. Programmers can write code that is dynamically loaded into the database server, and that operates on complex data types such as images. Those functions can be used in standard SQL queries, and the database manager can use new types and function results in indices to support fast queries on complex data. In addition, the query optimizer can be told how expensive the new functions are, so that it chooses an optimal strategy for satisfying complicated queries with many different predicates in their qualifications.