Maximo Open Forum

 View Only
  • 1.  Primary Key of MATUSETRANS Tabe

    Posted 03-19-2024 13:13

    I've got a strange question. Why is the primary key columns of the MATUSETRANS object include SITEID and MATUSETRANSID? These two attributes form the only unique key on that table. I would have guessed that it would just be the MATUSETRNASID attribute alone. Does anybody have a good explanation as to why it would also include SITEID. This means that for you could have two records with the same MATUSETRANSID value for two different SITEID values (although, the application will likely never generate data in this way).


    #Administration
    #Architecture
    #Inventory

    ------------------------------
    Kind Regards,

    Jared Schrag
    Koch Ag & Energy Solutions
    ------------------------------


  • 2.  RE: Primary Key of MATUSETRANS Tabe

    Posted 03-19-2024 13:55

    Hi Jared!. You should never have 2 records with the same MATUSETRANSID since it responds to a numerical sequencer (MATUSETRANSSEQ) that increments each new record by one. I imagine that defining SITEID as a primary key perhaps business logic requires that the data be grouped by site. as you know, much of the configuration is done at the site level.

    Also perhaps because of the integrity between the different tables since if you notice, SITEID is also a primary key in INVUSE and WORKORDER.

    Regards!



    ------------------------------
    Martin Fabra
    ARSAT S.A.
    ------------------------------



  • 3.  RE: Primary Key of MATUSETRANS Tabe

    Posted 03-20-2024 14:27

    Hi Jared,

    The MatUseTransID is the Unique Column ID for the MatUseTrans table and you should see an Index named MATUSETRANSU_NDX on that column alone.  Technically, the MatUseTransID could have been defined as the sole Primary Key Column, but most Site-Level objects include the SiteID in the Primary Key and most Org-level objects include the OrgID in the Primary Key.

    In the case of MatUseTrans, there really is no other set of columns other than MatUseTrans that form a Unique key since you can have multiple Issues or Returns for the same Item, Storeroom, Bin, WO, Location, and/or Asset with the same Transaction Date.

    For out-of-the-box objects, the Index on the Unique Column normally ends in "_Ndx" and should have the "Internal?" and "Enforce Uniqueness?" checkboxes checked.  The Index on the Primary Key Columns normally ends in "_Ndx1" and should have the "Enforce Uniqueness?" checkbox checked.



    ------------------------------
    Julio Hernandez
    Ergonare, Inc.
    ------------------------------