In this paper, still images are modeled by hierarchical tree structures and object relational graphs. These modeling concepts can be described naturally using XML schema. We introduce the notion of complex types and referential integrity to fully describe the physical and semantic properties of images. We further show how complex types of XML can be used to overcome the shortcomings of reported in the literature image database descriptions on an example of DTDs employed in MPEG7. We demonstrate the flexibility of our schema by formulating queries with a similarity function. The latter points to the query image, incorporates a set of features, their relative importance and a technique for their computation.