• Store XML file

    From nikosv@21:1/5 to All on Thu Apr 21 13:49:24 2022
    I have an XML file and want to store it in a table.Which data type should I choose?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roy Hann@21:1/5 to nikosv on Fri Apr 22 08:48:08 2022
    nikosv wrote:

    I have an XML file and want to store it in a table.Which data type
    should I choose?

    Depending on the potential size of the file I'd choose VARCHAR if I
    could be confident I could declare it big enough. A VARCHAR can be up to
    32kb if your page size is sufficient. I'd modify the table WITH COMPRESSION=(DATA).

    If my files might be too big for an ordinary VARCHAR then I'd go for
    LONG VARCHAR which has a 2Gb limit. They are not so convenient to use
    though. You may end up having to deal with data handler routines and
    they are harder to use in WHERE clauses.

    Roy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nikosv@21:1/5 to All on Fri Apr 22 05:22:46 2022
    thanks Roy.the file is less than 32K so varchar would be fine.
    As a side note,why doesn't Ingres support the native XML type?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roy Hann@21:1/5 to nikosv on Fri Apr 22 15:02:55 2022
    nikosv wrote:

    thanks Roy.the file is less than 32K so varchar would be fine.
    As a side note,why doesn't Ingres support the native XML type?

    Could you use JSON instead? Ingres has fairly extensive support for
    JSON.

    https://docs.actian.com/actianx/11.2/index.html#page/SQLRef/Working_with_JSON_Data.htm#

    Roy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nksvg@21:1/5 to All on Fri Apr 22 13:08:22 2022
    that would be ideal but the file is coming from a SOAP based web service
    so I'm stuck with XML

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)