Uniface User Forum

 View Only
  • 1.  Purifying historical data

    Posted 12-12-2023 10:23
    Does anyone know of a solution for purifying historical data? A solution where we can define scenarios for the destruction of data, for example, more than 10 years old? Taking into account the relationships defined in the Uniface model.


    ------------------------------
    Martin Charbonneau
    Medisolution
    Rimouski CA
    ------------------------------


  • 2.  RE: Purifying historical data

    Posted 12-12-2023 12:04
    Edited by Gianni Sandigliano 12-12-2023 12:05

    Hi Martin,

    Data is a value for any company nowadays; for this reason few companies opt for the destruction of historical data, choosing instead to archive them from an "online database" to a "historical database".

    Moving data from an "online database" to a "historical database" means: transferring ALL possible data prior to a certain date while maintaining the logical interconnections between them intact.

    An example: here in Italy, a company's administrative data must be kept by law for a minimum of 10 years; usually we proceed with archiving after those 10 years, but we could also archive them earlier, as everything depends on the type of business that is managed at company level and quality of management software available.
    There are companies that keep a large order / job / administrative item open for several years so that sometimes the archiving operation becomes complex, sometimes very very complex.

    This problem MUST be solved at a software level: the management application, after archiving previous years, MUST be able to allow the user to navigate from the "online database" to the "historical database" in a simple and effective way; example: the recap for a complex administrative operation crossing several years remain into "online database" because this operation is not yet CLOSED (like when there is a lawsuit pending...so CANNOT be closed) while related references details had already been archived because are more than 10 years old.

    I hope this short description can somehow help you to define your perimeter for "purifying historical data"... :-)

    Regards,
    Gianni



    ------------------------------
    Gianni Sandigliano
    IT
    ------------------------------



  • 3.  RE: Purifying historical data

    Posted 12-13-2023 09:02
    Thank you for the answer. But I am being asked for a solution for destroying historical data and not for archiving (for the moment). But I keep the option of a historical database.


    ------------------------------
    Martin Charbonneau
    Medisolution
    Rimouski CA
    ------------------------------



  • 4.  RE: Purifying historical data

    Posted 12-14-2023 01:45

    Hi Martin,

    OK, it's easier!

    The method remain the same going "by date maintaining logical interconnections" but doing immediately DELETE instead of INSERT/SELECT then DELETE.

    Regards,
    Gianni



    ------------------------------
    Gianni Sandigliano
    IT
    ------------------------------



  • 5.  RE: Purifying historical data

    Posted 12-14-2023 07:05

    A few thoughts that come to mind....  Via sql or via uniface (using uniface RI)  .

    1)if you have sql RI triggers

    delete from T1 where date <= {the cut off date}

    2)if you do not have sql RI triggers

    insert into temp  where select from T1 where date <= {the cut off date}

    delete from T2 where record is related to temp

    delete from T1 where date <= {the cut off date}

    3) Via uniface with cacade delete

    Create a component with T1 painted, inside it T2

    read trigger

    read where "date <= {the cut off date}"

    end



    ------------------------------
    Osman Shariff
    ------------------------------