Use of XQuery Update Facility

Dear all,
I am looking for some database systems that use the W3C XQuery Update facility specification to modify their data.
To the best of my knowledge, no of well-known commercial database systems uses XQuery Update primitives.
For instance, Oracle 11g defines some SQL/XML update functions (combined with some XQuery expressions) to modify XML data stored within the database through the XMLType data type.
IBM DB2 9 uses SQL update statement to modify the whole XML document stored as an XML column and no update is proposed to modify parts of the document.
Are there some database systems providing XQuery-Update-Facility-based update of their data.
Thank you in advance.
Best regards.

Were you aware of
[url http://www.liberidu.com/blog/2011/09/22/oracle-xmldb-xquery-update-in-database-release-11-2-0-3-0/]Oracle XMLDB XQuery Update in Database Release 11.2.0.3.0
Given it is new, expect a few bugs, such as
{thread:id=2355054}
If you have specific questions related to XQuery Update, the best place to ask them is over in the {forum:id=34} forum.

Similar Messages

  • XQuery Update Facility

    I see on the Wikipedia article for XQuery Update Facility, that XQilla, which BDBXML uses, implements the XQUF (not sure to which degree though). Can you utilize these commands in any XQuery, and does it require a special use of the API? Any documentation on your site? This looks like a very exciting language extension to have available.
    thank you,
    Brett

    Brett,
    Thanks. This also means XmlModify will eventually disappear since it's no longer
    necessary (and now implemented in terms of XQuery Update anyway). It's still around for
    now.
    As for security, we're considering one or both of:
    1. bool XmlQueryExpression::isUpdateExpression() to allow the application
    to ask the question and decide.
    2. A flag (e.g. DBXML_NO_UPDATES) passed to the relevant execute() and query() functions. In Java it'd be a new configuration option in XmlDocumentConfig
    Do you have a preference? I'm leaning toward (1) -- it's a slightly simpler change
    and just as easy to use.
    Regards,
    George

  • XQuery Update Facility in XMLDB?

    Hi
    I didn't find information about XQuery Update Facility
    support or XUpdate support in Oracle XML DB. Do you have
    such info?
    Regards,
    --drkm                                                                                                                                                                                                                                                                                                                           

    Xquery update is NOT anywhere near well enougth defined for us to implement it at present. We are actively involved in the standards process for XQuery update. It's very unclear what the future of the XUpdate is at this point...
    We support node-level updates through a set of SQL functions
    updateXML (9iR2 and later), insertChildXML, appendChildXML, insertXMLBefore and deleteXML (10gr2 and later)
    Message was edited by:
    mdrake

  • XML DML XQuery Update syntax

    Hi everybody,
    Certainly my question will appear strange and even stupid , but I want to be sure to use the best syntax and also to be confirmed about some points.
    In the document Oracle XML DB Best practices, we can find a lot of statements for modifying XML documents. In page 11 and 12 we have statements with and without XQuery syntax. What is exactly the best way ? Using insertchildxml, updatexml or the update statement with the XMLQuery clause ?
    Why we use copy in these statement, but the keyword copy is not used in a XQuery expression.
    I think copy is not specific to Oracle, is it used in XQuery language ?
    In page 15, the SQL statement to modify XML document uses deletexml, not a XQuery update syntax.
    I'm using Oracle 11G.
    Thanks in advance for your explanations

    user4423142 wrote:
    In the document Oracle XML DB Best practices, we can find a lot of statements for modifying XML documents. In page 11 and 12 we have statements with and without XQuery syntax. What is exactly the best way ? Using insertchildxml, updatexml or the update statement with the XMLQuery clause ?The recommended way is closely tied to the version you're using, which you didn't give.
    "11g" is not a version, it's a product name.
    You can find the version by running :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE     11.2.0.3.0     Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    XQuery Update on Oracle in available in the latest version only : 11.2.0.3.
    If you're using this version, Oracle recommends you start using XQuery Update.
    Why we use copy in these statement, but the keyword copy is not used in a XQuery expression.
    I think copy is not specific to Oracle, is it used in XQuery language ?<tt>copy</tt> is specific to the XQuery Update Facility (XQUF) extension of the XQuery 1.0 language.
    The XQUF was primarily intended to work with native XML databases where it's OK to directly invoke update primitives (insert, delete, replace etc.) to modify database content.
    On Oracle, it's not possible and the current implementation only supports XQUF through the "transform" operation (copy/modify syntax) where a copy of the original document/fragment is modified and written back to the db.
    However, XQuery rewrite and related optimizations may occur so that piecewise updates actually take place.

  • XQuery Update (11.2.0.3) and the path table

    Hi,
    I'm currently using XQuery update on 11.2.0.3 to merge 2 XML documents, having tried a number of approaches up to now on 11.2.0.2.
    My table has one XMLType column (securefile binary containing unstructured xml) which has XML deltas applied to it via a stored procedure.
    An unstructured XML index is defined on the column.
    Previously, I was doing the following:
    1) Merge documents using XMLQuery; only produce a merged document if changes were detected
    2) Update the table if the merged document is non-null
    i.e.
    select XMLQuery(<merging code>) passing oldDoc as "oldDoc", delta as "delta" returning content) into mergedDoc from dual;
    if (mergedDoc is not null) then
        update myTable set xmlDoc = mergedDoc where id=v_id;
    end if;However, this replaces the entire document if any changes are detected (with an obvious impact on the path table).
    I then read (UpdateXML query rewrite with unstructured data? about the use of XQuery Update in 11.2.0.3 to only target the affected document fragments so my current approach is:
    update myTable
    set xmldoc =
            xmlquery('declare namespace m="http://www.blah.com/merge";
            (: See if two nodes have matching text (or no text which is an empty sequence :)
            declare function m:matchText($one as element(), $two as element()) as xs:boolean {
                if ($one/text() = $two/text() or count($one/text())=0 and count($two/text())=0) then true() else false()
            declare updating function m:merge($old as element()?, $new as element()?) {
                (for $o in $old/* return
                    for $n in $new/* where name($o) = name($n) return
                        if (count($n/*) > 0) then
                            m:merge($o, $n)
                        else
                            if (m:matchText($n, $o)) then () else replace value of node $o with $n,
                    for $n in $new/* where (not(some $o in $old/* satisfies name($o) = name($n))) return insert node $n into $old)
            copy $d := .
            modify (
                (m:merge($d/*,$delta/*))
            ) return $d'
            passing xmldoc, delta as "delta"
            returning content)
    where id = v_id;If no changes were detected between the documents (i.e. the XQuery update did not actually modify the document), would you expect this statement to have no impact on the path table? Is there any way to get more trace information which shows what the update is actually doing when it executes?
    Apologies if this is overlong or if I have omitted any supplementary information.
    Thanks for any assistance
    Larry

    Hi,
    many thanks for your reply.
    A simple testcase is below. The recursive approach is required because the documents may be hierarchial.
    create table mytable (id number(19,0), xmldoc xmltype) xmltype column "XMLDOC" store as securefile binary xml;
    insert into myTable values (1,xmltype('<xml><el1>1</el1><el2>2</el2><el3>3</el3></xml>'));
    update myTable
    set xmldoc =
            xmlquery('declare namespace m="http://www.blah.com/merge";
            (: See if two nodes have matching text (or no text which is an empty sequence :)
            declare function m:matchText($one as element(), $two as element()) as xs:boolean {
                if ($one/text() = $two/text() or count($one/text())=0 and count($two/text())=0) then true() else false()
            declare updating function m:merge($old as element()?, $new as element()?) {
                (for $o in $old/* return
                    for $n in $new/* where name($o) = name($n) return
                        if (count($n/*) > 0) then
                            m:merge($o, $n)
                        else
                            if (m:matchText($n, $o)) then () else replace value of node $o with $n,
                    for $n in $new/* where (not(some $o in $old/* satisfies name($o) = name($n))) return insert node $n into $old)
            copy $d := .
            modify (
                (m:merge($d/*,$delta/*))
            ) return $d'
            passing xmldoc, xmltype('<xml><el1>1-UPDATE</el1><el4>4</el4></xml>') as "delta"
            returning content)
    where id = 1;This results in one update and one insert:
    <xml><el1>1-UPDATE</el1><el2>2</el2><el3>3</el3><el4>4</el4></xml>It currently produces the following trace:
    *** 2012-03-13 10:13:34.708
    not delete/insert/replace in modify clause
    --------- XQuery NO rewrt expr END-----
    --------- XQuery NO rewrt expr BEG-----
    UDF with noderef
    --------- XQuery NO rewrt expr END-----I've noticed that even with a simple XQuery update like the following:
    update myTable set xmldoc =
            xmlquery('copy $d := .
            modify (
                (replace value of node $d/xml/el1 with "1-UPDATE-2",insert node <el4>4</el4> into $d/xml)
            ) return $d'
            passing xmldoc
            returning content) where id = 1;I get the following trace:
    *** 2012-03-13 10:31:42.280
    --------- XQuery NO rewrt expr BEG-----
    non-simple content in target expression
    --------- XQuery NO rewrt expr END-----
    --------- XQuery NO rewrt expr BEG-----
    not delete/insert/replace in modify clause
    --------- XQuery NO rewrt expr END-----
    Non-iterator usage
    Non-iterator usageDoes this also indicate that a rewrite is not occurring, or is this only when a message like "NO REWRITE Reason ==> xseq:not optuop" is traced?
    I'll try XSLT in the meantime.
    Regards
    Larry

  • HT4972 why dont I have an update facility on my ipad

    Why dont I have an update facility on my ipad

    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 7.1. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    You can no longer update to iOS 6.x, or down grade the iOS.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and antivirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 7.x, the next update can be installed via wifi (i.e., not connected to your computer).
    Tip 2 - If you're updating via wifi, place your iPad close to your router to preclude getting a corrupted download.
    How to Upgrade to iOS 7
    The iOS 7.0 update requires around 2.5 GB of storage space, so if your iPad is almost full, you may need to clear up some space. You can check your available space in Settings -> General -> Usage.
    There are two ways to upgrade to iOS 7: You can use your Wi-Fi connection, or you can connect your iPad to your PC and update through iTunes. We'll go over each method.
    To upgrade using Wi-Fi:
    Note: If your iPad's battery is under 50%, you will want to plug it into your charger while performing the update.
    Go into the iPad's Settings.
    Locate and tap "General" from the menu on the left.
    The second option from the top is "Software Update". Tap this to move into the update settings.
    Tap "Download and Install". This will start the upgrade, which will take several minutes and will reboot your iPad during the process. If the Download and Install button is grayed out, trying clearing up some space. The space required by the update is mostly temporary, so you should gain most of it back after iOS 7 is installed.
    Once the update is installed, you may have to run through the initial steps of setting up your iPad again. This is to account for new features and settings.
    To upgrade using iTunes:
    First, connect your iPad to your PC or Mac using the cable provided when you purchased your device. This will allow iTunes to communicate with your iPad.
    You will also need the latest version of iTunes. Don't worry, you will be prompted to download the latest version when you launch iTunes. Once it installs, you may be asked to setup iCloud by logging into your iTunes account. If you have a Mac, you may be prompted on whether or not you want to enable the Find my Mac feature.
    Now you are ready to begin the process:
    If you upgraded iTunes earlier, go ahead and launch it. (For many, it will launch automatically when you plug in your iPad.)
    Once iTunes is launched, it should automatically detect that a new version of the operating system exists and prompt you to upgrade to it. Choose Cancel. Before updating, you will want to manually sync your iPad to make sure everything is up to date.
    After canceling the dialog box, iTunes should automatically sync with your iPad.
    If iTunes doesn't automatically sync, you can manually do it by selecting your iPad within iTunes, clicking on the File menu and choosing Sync iPad from the list.
    After your iPad has been synced to iTunes, select your iPad within iTunes. You can find it on the left side menu under Devices.
    From the iPad screen, click on the Update button.
    After verifying that you want to update your iPad, the process will begin. It takes a few minutes to update the operating system during which time your iPad may reboot a few times.
    After updating, you may be asked a few questions when your device finally boots back up. This is to account for new settings and features.
     Cheers, Tom

  • Xquery update transaction (xqilla)

    Hi,
    it seems that when performing an xquery update such as 'insert node' that a transaction is allocated for this query, so that (using the Java API) there is no need to explicitly create a transaction - is this true?
    If it is, then just using xquery gets rid of a transaction management problem and the try/finally.
    thanks,
    Norman

    An updating query is auto-transacted if a transaction is not provided. However, auto-transacted methods still need to catch deadlock exceptions and retry.
    John

  • XQuery update

    Hello,
    I seems that the CVS version of XQuilla implements a large part of the XQuery Update working draft, which is great !
    Does it mean that it's usable with BDB XML as-is to get database updates ?
    Thanks,
    Fabrice

    Hi Fabrice,
    I'm afraid there is significant work to do in DB XML before XQuery Update can be used from it. However, It is our intention to support XQuery Update in some future version.
    John

  • Decreasing performance when executing consecutive XQuery Update operations

    hello,
    I am writing an application in java using Berkeley DB XML (2.5.16). I have to run a test over the application, in which a lot of XQuery Update operations have to be executed. All update operations are insert statements. In the beginning the test works fine. However, as the number of updates increases (over 1000 XQuery Updates), there is also a great increase in time of execution. How can I enhance the performance of updates?
    Note that:
    1) The environment configuration is the following:
    EnvironmentConfig envConfig = new EnvironmentConfig();
    envConfig.setAllowCreate(true);
    envConfig.setInitializeCache(true);
    envConfig.setCacheSize(512*1024*1024);
    envConfig.setInitializeLocking(false);
    envConfig.setInitializeLogging(false);
    envConfig.setTransactional(false);
    2) No transactions are used
    3) The container is a node container
    4) Auto-indexing is on (I need that)
    5) The container includes only one xml of 2,5MB size.
    6) In some insert statements 1000 nodes are to be inserted.
    7) I am running windows vista on a 4GB Ram pc.
    Thank you in advance,
    theo

    Hi Lucas,
    Thanks a lot for your reply! However, I have a few more questions.
    Given that the xml is about 2.5MB size, is it considered to be that big for Berkeley DB so it needs to be break down into smaller documents?
    Also, after having executed ~4000 xquery update insert operations and doubled xml’s size, the performance it’s really getting worse… An insertion may even take 1.5 min, when for each of the first 3000 insertions only less than 0.5 sec is needed… Is there something I am missing in the configuration of Berkeley DB? If I set autoindexing off and try to maintain fewer indexes, is it possible to see significantly better performance? Till now I am just getting the following error when I set my indexes and try to execute consequent insertions over the same node:
    Exception in thread "main" com.sleepycat.dbxml.XmlException: Error: Sequence does not match type item() - the sequence does not contain items [err:XUDY0027], <query>:1:1, errcode = QUERY_EVALUATION_ERROR+
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlQueryExpression_execute__SWIG_1(Native Method)
    at com.sleepycat.dbxml.XmlQueryExpression.execute(XmlQueryExpression.java:85)
    +<myClasses>+
    Thanks,
    theo

  • Windows Update Client failed to detect with error 0xc8000247 after using Lenovo System Update 5

    My Windows 7, SP1 was running fine, until I installed few updates on 10/15 using Lenovo System Update 5 then Windows Update stopped working, shows as RED:
    {CE3119AD-35EF-41CF-9C21-C7698FEB8393}    2013-10-14 21:53:00:256-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Software Synchronization    Windows Update Client successfully detected 4 updates.
    {EB17A01A-EB6E-49FF-9EA2-AA0DD063B4B1}    2013-10-15 04:15:54:069-0700    1    162    101    {C61A0D00-3E51-48AC-B0AF-1D3E02B9E5D3}    201    0    AutomaticUpdates    Success    Content Download    Download succeeded.
    {77DAE88F-2795-4258-8BBF-8D27E53662CF}    2013-10-15 12:10:38:196-0700    1    193    102    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Content Install    Restart Required: To complete the installation of the following updates, the computer must be restarted. Until this computer has been restarted, Windows cannot search for or download new updates:  - Security Update for Windows 7 for x64-based Systems (KB2862330)
    {1398F777-3AEF-4D1D-BE4C-407EC4AEAD4C}    2013-10-15 12:15:25:676-0700    1    183    101    {C61A0D00-3E51-48AC-B0AF-1D3E02B9E5D3}    201    0    AutomaticUpdates    Success    Content Install    Installation Successful: Windows successfully installed the following update: Security Update for Windows 7 for x64-based Systems (KB2862330)
    {A220898A-E5FE-4FE7-8413-2B0C7B4013D0}    2013-10-15 12:15:25:766-0700    1    202    102    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Content Install    Reboot completed.
    {A5400FF2-33ED-4A47-8409-13E5DFE16A6D}    2013-10-15 19:29:31:486-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    ChkWuDrv    Success    Software Synchronization    Windows Update Client successfully detected 0 updates.
    {43C533EE-775D-445E-A652-06648B72DE65}    2013-10-15 19:29:49:702-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    ChkWuDrv    Success    Software Synchronization    Windows Update Client successfully detected 0 updates.
    {D6AAAFFB-7F18-4A7E-B39D-1BA09CDC5E6D}    2013-10-15 19:30:05:744-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Software Synchronization    Windows Update Client successfully detected 3 updates.
    {4E73B1C1-5BA2-415D-AB34-92F7AB3DB418}    2013-10-15 19:30:08:753-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    ChkWuDrv    Success    Software Synchronization    Windows Update Client successfully detected 0 updates.
    {51248882-41AC-4E59-B813-87AD326310AD}    2013-10-15 20:00:05:044-0700    1    183    101    {DBD3B4E9-0357-47DA-8317-D0CF2163BFE6}    501    0    wusa    Success    Content Install    Installation Successful: Windows successfully installed the following update: Hotfix for Windows (KB2661796)
    {FB2B8E5E-442C-4E76-B23D-6A41B4324C9D}    2013-10-16 00:11:39:832-0700    1    148    101    {00000000-0000-0000-0000-000000000000}    0    c8000247    AutomaticUpdates    Failure    Software Synchronization    Windows Update Client failed to detect with error 0xc8000247.
    Lenovo Thinkpad W500, Intel (R), Windows 7, SP1, latest updates as of Oct 15
    (1) Checked Setting,  set to automatic update whenever, even changed to never update, rebooted the OS and changed back to automatic update and rebooted the OS.
    (2) Stopped Windows Update Services, renamed SoftwareDistribution folder and started the window update services and rebooted.
    (3) Ran MS FIXIT
    (4) Ran System File checker Scan (sfc /scannow)
    (5) Ran CHKDSK /F
    (6) Installed "Intel Rapid Storage Technology" drivers from Lenovo site
    (7) Ran Update for Windows 7 for x64-based Systems (KB971033)
    None of the above possible recommended solutions were able to fix the issue yet and now I am getting a message your Window is Not Genuine!
    Any help or guidance is appreciated.
    Solved!
    Go to Solution.

    The Lenovo System Update installed the "Intel Matrix Storage Manager driver 8.9.2.1002" right before the Windows Upgrade got broken. So in the Device Manager under IDE ATA/ATAPI Controllers, I choose Intel ICH9M-E/M SATA AHCI Controller, on the Driver Tab, I choose the option "Roll Back Driver" and after rolling back the driver and restarting the OS, now Windows Update is working like a Champ!
    The End!

  • I have an apple ID, I'm trying to use this to update and download apps etc. however, whenever I try this, it keeps asking me to use my old ID, which is attached to an email that no longer exists! I can't download or update anything! Help!

    I have an apple ID, I'm trying to use this to update and download apps etc. however, whenever I try this, it keeps asking me to use my old ID, which is attached to an email that no longer exists! I can't download or update anything! Help!

    You can log out of the currently logged in account by taping on the id in Settings > Store (Settings > iTunes & App Stores on iOS 6) and you can then log back in.
    If you updated your existing account with a new email address then that shoud 'refresh' it on it
    If you created a new account then any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can redownload its content and download updates to its apps. You should be able to update an account's email address via this page : http://appleid.apple.com

  • HT4623 Please  help!  i have just update my iphone 4s with 7.4 update and my phone is now asking for a password which i dont have.  I have tried my keypad lock i used before the update and also my itunes password and neither work, how do i rectify this ??

    Please  help!  i have just update my iphone 4s with 7.4 update and my phone is now asking for a password which i dont have.  I have tried my keypad lock i used before the update and also my itunes password and neither work, how do i rectify this ???

    Did you buy this iPhone new from an authorized seller?

  • How can i use Itunes to update more than one IPad with more than one owner

    How can i use Itunes to update more than one IPad with more than one owner?  I own an IPad and my wife owns an IPad.  I want to use my system to update both IPads.  We have different Apple Accounts and different applications.  Is this possible?

    Of course, that is too easy.  I am such a bonehead.

  • I use Lightroom 5 (update)on my PC. Now I want to use Lightroom also on my notebook but it has no CD-drive. Can you help me - Wilhelm Habermalz

    I use Lightroom 5 (update)on my PC. Now I want to use Lightroom also on my notebook but it has no CD-drive. Who can help me - Wilhelm Habermalz

    The easiest way would be to download the trial version, and then use your existing serial number to activate.  Or, if you have already downloaded the update to use to update your original installation, you could copy the file that you downloaded to a flash drive and use it on your other computer.

  • The front camera on my iPod touch 4th generation is frozen. I cannot use it. Updating software does not help. This started right after I bought it, new from BestBuy. What can I do?

    The front camera on my iPod touch 4th generation is frozen. I cannot use it. Updating software does not help. This started right after I bought it, new from BestBuy. What can I do? When i go to the camera, it is stuck on a black screen. the only way to use my camera is through other camera apps, but if I try to switch it to the front camera, it freezes again.

    If you still have the problem after retoring the iPOd to factory defaults/new iPod then The iPod is likely defective and replacement is required.  You can make an appoinment at the Genius Bar of an APple store or take it back to BestBuy if within warranty

Maybe you are looking for