webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Notion of Uniqueness (Primary Key?)

  • 1.  Notion of Uniqueness (Primary Key?)

    Posted Tue October 23, 2001 03:19 PM

    Perhaps I’ve missed it, but is there the ability to define a “Business” Primary Key, (not ino:id) which uniquely identifies a document?
    I’m sure one can add an attribute as a user-defined primary key, but I’d like to be able to enforce uniqueness within Tamino, and have it return a “Document already exists” error when adding a Document with a Primary Key that is already stored in Tamono.

    Thanks in advance,
    STeve


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Notion of Uniqueness (Primary Key?)

    Posted Tue October 23, 2001 04:07 PM

    At the moment there is no concept of a primary key within Tamino; you can define an element within a schema as a standard index but this does not guarantee uniqueness.

    I thought about implementing this from an application - say by querying for this value and if there are no resulting documents it is safe to store. If there is a document then the store could be rejected. This will probably work until two clients try to insert at the same time - both will query and get no document found so both will store and this isn’t really what you want. Of course you can work around this by additional coding but this starts to become a complex solution.


    #webMethods
    #API-Management
    #Tamino