Hi Sean,
> I load about 600 of these, each with 30k entries at the beginning of the
> year. Then, as the year progresses, I receive a new file, one per week,
> that has the same structure as the above. In these additional files, some
> records are added (that have PMID that are not already in the collection)
> while others are "updates" (that have a PMID already in the collection).
> For those records for which there is no PMID already in the collection, I
> simply want to add them as usual. However, for those that have an existing
> record (as evidenced by a matching PMID in the collection), I want to either
> update the existing record or simply remove it and add the new record. The
> total data are about 50GB or so, so this is a rather large database.
>
Triggers in Sedna can be used only for Updates (INSERT, REPLACE,
DELETE,RENAME), but, unfortunately, not for bulk load/drop of a whole
document or collection. So, for your situation I would suggest the
following.
As new file comes, load it as a separate document with some temporary name.
Then execute UPDATE INSERT for those nodes that are new (see here about how
to write UPDATE expressions in Sedna
http://modis.ispras.ru/sedna/progguide/ProgGuidesu6.html#x12-430002.3). Then
execute UPDATE REPLACE for the nodes that there are in main big document.
And at least, DROP this temporary document. I think this is relatevely easy
solution.
Hope this helps
Maria Grineva
Sedna team
>
>
> Thanks,
> Sean
>
>
>
>
>>
>> On Sat, Nov 15, 2008 at 7:03 PM, Sean Davis <[EMAIL PROTECTED]> wrote:
>>
>>> Sorry for all the questions recently, but I am learning a ton from the
>>> answers (so, I keep asking).
>>>
>>> I have a set of XML documents that are loaded into a collection once per
>>> year. Then, throughout the year, updates are sent out and need to be either
>>> inserted (if a record does not exist) or updated (if a record exists). The
>>> update can be a simple replace of the entire node. Is it possible to
>>> convert an insert to an update using triggers so that I can still do bulk
>>> loads rather than having to load nodes one-at-a-time? It is a little
>>> complicated, because the updates would be from a different document than the
>>> original record. Any suggestions on how to do this? I can, of course, do
>>> all of this from an external application, but it would be nice to do it from
>>> within the database.
>>>
>>> Thanks (AGAIN),
>>> Sean
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Sedna-discussion mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>>>
>>>
>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Sedna-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion