• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server

UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server






Total Views
Views on SlideShare
Embed Views



9 Embeds 9,315

http://technology.amis.nl 7274
http://www.liberidu.com 1986
http://paper.li 22
http://www.javaoracleblog.com 12
http://translate.googleusercontent.com 10
http://webcache.googleusercontent.com 8
http://a0.twimg.com 1
https://www.google.co.jp 1
https://www.google.ae 1



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server Presentation Transcript

    • Drag, Drop and other Stuff
    •  Mark D Drake Senior Product Manager Product: Oracle XML DB Oracle HQ, USA Oracle 20+ years experience
    •  Marco Gralike Principal Database Consultant DBA; Specialized Oracle XML DB AMIS Services BV, Holland Oracle experience since 1993 Oracle ACE Director OakTable Member
    • XML DB Repository
    •  Based on XML Standards: XPath V2 , XSLT V1 , XQuery V1 , XQuery Update ( , XBRL (Extention) XML Handling Stores, Consumes, Generates, Validates XDB Repository HTTP(s), FTP & WebDAV XDB Repository Events No Cost Option, Core database feature
    •  XDB Repository File / Folder (aka Resources) Resource manipulation DBMS_XDB, DBMS_XDBRESOURCE Default XDB ACL Driven Security XDB Protocol Listener XDB Respository Events XML Schema awareness Extending XML Schema functionality
    •  XDB$RESOURCE  XDBResource.xsd  XMLType Table (Schema based XML Table) Access to XDB Repository  WebDAV, FTP, HTTP(s)  SQL, PL/SQL, NDWS  PATH_VIEW, RESOURCE_VIEW Select, Update, Delete  UNDER_PATH, EQUALS_PATH
    •  XML Schema: xdb$resource.xsd XMLType Table PATH_VIEW, RESOURCE_VIEW Non Schema based metadata in LOB Info about: RESID, DisplayName, Owner, Creator, VersionID, ChecktOut, CreationDate, ModifiedDate, SizeOn Disk, ContentSize, ContentType, Comments, Char acterSet, Etc…
    • Servlet ?MIME Type?Security ?XMLSchema ?XDB Event ?Extention?
    • Use Case
    • Database FileServer 2 The MAX Copy a FILE to the Database
    • EventMIME Event ListenerCheck Handler XML Protocol Server (Listener)
    • Extract MoveFile Info Store in XDB Repository
    • Extract File XDB File to Content Server Batch File to XDB “Batch” Directory
    • Use Case
    • Database FileServer 2 The MAX Copy a PICTURE to the Database
    • EventMIME Event ListenerCheck Handler XML Protocol Server (Listener)
    • Extract Store in XML Table Store in XDB Repository
    • EXIF KML Display in GUI, Google Map
    • Methods at Work
    • Servlet ?MIME Type?Security ?XMLSchema ?XDB Event ?Extention?
    •  XML Schema - xdbconfig.xsd Notepad, XMLSpy, PL/SQL Secured via WebDAV ACL (xdbadmin) Packages (among others):  DBMS_XDB ▪ Caching, Session, Locking, Security behavior ▪ Enable HTTP/FTP, MIME, Encoding, Virtual Paths ▪ SERVLETS: NDWS, APEX, XDBUrifactory  DBMS_EPG ▪ Creation off Database Access Descriptors
    • <xdbconfig> <sysconfig> <acl-max-age>15</acl-max-age> <acl-cache-size>32</acl-cache-size> <invalid-pathname-chars/> <case-sensitive>true</case-sensitive> <call-timeout>6000</call-timeout> <max-link-queue>65536</max-link-queue> <max-session-use>100</max-session-use> <persistent-sessions>false</persistent-sessions> <default-lock-timeout>3600</default-lock-timeout> <xdbcore-log-level>0</xdbcore-log-level> <resource-view-cache-size>1048576</resource…size> <xdbcore-xobmem-bound>1024</xdbcore-xobmem-bound> <xdbcore-loadableunit-size>16</xdbcore-……………size> <acl-evaluation-method>ace-order</acl-ev……method> </sysconfig></xdbconfig>
    • <servlet xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"> <servlet-name>APEX</servlet-name> <servlet-language>PL/SQL</servlet-language> <display-name>APEX</display-name> <plsql xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"> <database-username>ANONYMOUS</database-username> <default-page>apex</default-page> <document-table-name>wwv_flow_file_objects$</doc…name> <document-path>docs</document-path> <document-procedure> wwv_flow_file_mgr.process_download </document-procedure> <nls-language>american_america.al32utf8</nls-language> <request-validation-function> wwv_flow_epg_include_modules.authorize </request-validation-function> </plsql> <security-role-ref> <role-name>anonymousServletRole</role-name> <role-link>anonymousServletRole</role-link> </security-role-ref></servlet>
    • XML Schema XML SchemaXML Document in XML ? Registered ?Physical XMLType Shred XML into Update Associated ? XMLType XDB$Resource
    • Methods at Work
    •  Event Listener  Java Class, PL/SQL Package, Object Type ▪ A Package called: “HANDLE_XDB_EVENTS” Event Handlers  Event handlers processes a single event ▪ Package procedures called “handlePreCreate”, “handlePostCreate, “handlePreVersi onControl”… Resource Configuration File  The glue between Event Listener and Resources
    •  Render  UnLinkIn  UnCheckOut Create  UnLinkFrom  VersionControl Delete  Lock  UnLock Update  CheckIn  LinkTo LinkIn  CheckOut
    •  Create handlePreCreate handlePostCreate Delete handlePreDelete handlePostDeleteRender handleRenderLock handlePreLock… handlePostLockURL: XDBEvent XDBEventListener
    • Methods at Work
    •  Glue between Event Listener and Resource An XML File  XML Schema - 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
    •  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>
    • Holistic Approach
    • Servlet ?MIME Type?Security ?XMLSchema ?XDB Event ?Extension?
    • Everyone is known with EXIF…
    • Jeffreys EXIF Viewer
    • Camera Make and ModelAperture, Shutter Speed, Focal LengthISO Speed, Date Taken, DescriptionGeo-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
    •  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
    • Oracle® Multimedia Users Guide 11g R2Oracle Multimedia Metadata XML Schemas
    •  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
    • Document MIME type JPG Event Listener? EXIF EXIF ExtendedEvent Handler? XML Schema? w/ USER XSD ? Extract JPG Extract JPG Extract JPG File info EXIF info USER metadataXDB$Resource XMLType Table XMLType Table
    • Oracle XML DB Repository
    • • 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
    •  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…