33. Glue between Event Listener and Resource
An XML File
XML Schema restricted: XDBResConfig.xsd
Contains (among others):
Events and Source (Event Listener)
Path to “itself” (/public/myResFile.xml)
Pre-conditions (XPATH on XDB$RESOURCE)
Is assigned to a Resource (File/Folder)
DBMS_RESCONFIG.AppendResConfig
34. XML Schema: xdb$resource.xsd
XMLType Table
PATH_VIEW, RESOURCE_VIEW
LOB Column (with file content)
Non Schema based metadata in LOB
Info about:
RESID, DisplayName, Owner, Creator, VersionID,
ChecktOut, CreationDate, ModifiedDate, SizeOnDisk,
ContentSize, ContentType, Comments, CharacterSet,
Etc…
35. Move all files created by BATCH to…
Extract Info from picture if extension GIF…
<pre-condition>
<existsNode>
<XPath>/Resource[Creator="BATCH"]</XPath>
</existsNode>
</pre-condition>
<pre-condition>
<existsNode>
<XPath>/Resource[ContentType="image/jpg"]</XPath>
</existsNode>
</pre-condition>
43. Camera Make and Model
Aperture, Shutter Speed, Focal Length
ISO Speed, Date Taken, Description
Geo-coding, Copyright Information
EXIF XML Schema is pre-registered with XML
DB by Oracle MultiMedia
Type ordsys.ordimage extracts EXIF
metadata document from a JPG image
44. The following embedded image metadata
formats are supported by Oracle Multimedia:
EXIF (JPEG/TIFF - JEIDA)
IPTC-IIM (JPEG/TIFF – Adobe)
XMP (GIF/JPEG/TIFF – Adobe/RDF)
http://www.adobe.com http://www.w3.org/RDF Wikipedia - EXIF
46. Metadata defined using an XML Schema
Metadata stored in a separate table
Table includes hidden column RESID
Enables join with RESOURCE_VIEW, PATH_VIEW
Applications query and update metadata
directly
Improved Indexing
Metadata deleted when resource is deleted
47. Document MIME type JPG Event Listener?
EXIF EXIF Extended
Event Handler?
XML Schema? w/ USER XSD ?
Extract JPG Extract JPG Extract JPG
File info EXIF info USER metadata
XDB$Resource XMLType Table XMLType Table
52. • General File Stuff turns out to be XML then…
4. XML SCHEMA REGISTRATION
• dbms_xmlschema.register_schema
5. EXTRA USER DEFINED METADATA NEEDED
• dbms_xmlschema.enable_hierarchy_resm
etadata
53. • XML DB
- Beyond the Database, Fileserver Realm
• Imagination is your limit, e.g.:
- Extending “file” server with Text Search
- Extending “file” server with ETL functionality
• Extra options: database / fileserver interfacing
• Based on standards
• No cost option / all database versions
54. URL: OTN XMLDB Sample Code
XFILES Version 5
Introduction to Oracle XML DB Repository Events
Oracle XML DB-based Mashup with Google Earth
Oracle XML DB Repository Features
XDB Utilities and more…
55. Blog posts about:
Setting up logging in the XDB Repository
Package template HANDLE_XDB_EVENTS
Concepts & Howto’s for XDB Repository
Automatically shred content out of Windows
Office (docx) into table columns
References to XLSX examples of Marc Bleron and
Anton Scheffers