• Store XML file

    From nikosv@nikos.vaggalis@gmail.com to comp.databases.ingres on Thu Apr 21 13:49:24 2022
    From Newsgroup: comp.databases.ingres

    I have an XML file and want to store it in a table.Which data type should I choose?
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Roy Hann@specially@processed.almost.meat to comp.databases.ingres on Fri Apr 22 08:48:08 2022
    From Newsgroup: comp.databases.ingres

    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

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From nikosv@nikos.vaggalis@gmail.com to comp.databases.ingres on Fri Apr 22 05:22:46 2022
    From Newsgroup: comp.databases.ingres

    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?
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Roy Hann@specially@processed.almost.meat to comp.databases.ingres on Fri Apr 22 15:02:55 2022
    From Newsgroup: comp.databases.ingres

    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

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From nksvg@nksvg1@gmail.com to comp.databases.ingres on Fri Apr 22 13:08:22 2022
    From Newsgroup: comp.databases.ingres

    that would be ideal but the file is coming from a SOAP based web service
    so I'm stuck with XML
    --- Synchronet 3.21b-Linux NewsLink 1.2