A metadata database adaptor for use with a surveillance and/or sensor
system is capable of adapting metadata messages of varying formats
according to needs of metadata databases. In other aspects, a metadata
data model template can allow a user to define a data definition that is
used to map user defined data with the metadata data model template to
form XML data schema. Template mapping knowledge can then be applied for
fast XML data schema to non-XML database schema generation without
translation processing. In yet other aspects, an application domain
template can allow a user to define a query definition that can then be
processed with a mapping of the application domain template to translate
Xpath, Xquery, or others to a database query.