Storing XML data in AWS DB

0

What is the best DB service in AWS to store XML data? I do not want to convert to JSON. Need to retrieve XML and display on UI when needed. Size may not be more than 200 KB max. Today it is stored in oracle as BLOB/CLOB which we want to redesign.

3 個答案
0

Aside from using RDS Oracle, both MySQL and PostgreSQL support BLOB/CLOBs and they are available both as RDS and Aurora Engines:

https://docs.aws.amazon.com/rds/index.html

profile pictureAWS
已回答 2 年前
0

Hi, @AWSUserXML

If you just want to get specific XML by key or record, you can just use various RDBMS large objects and KVS.
See @Rodney Lester 's answer.

If you want to query on an element of an XML document, the native XML database service is not provided by AWS.

You can host your own native XML database on EC2.
However, considering the management cost, I think it is better to implement a wrapper that converts to XML at the timing of saving and fetching in the application.

profile picture
專家
iwasa
已回答 2 年前
0

As mentioned by Rodney, you could use PostgreSQL (RDS for PostgreSQL or Aurora PostgreSQL-compatible edition) or MySQL (RDS for MySQL or Aurora MySQL-compatible edition).

I would lean towards PostgreSQL because of the relative simplicity. There is an XML type. Postgres doesn't require specifying max character lengths for VARCHAR, and you can use VARCHAR or TEXT for strings of any length, if you just want to treat the values as strings.

postgres=> create table xml_t (t xml);
CREATE TABLE
postgres=> insert into xml_t values ('<foo>bar</foo>'::xml);

XML support in the PostgreSQL engine:

https://www.postgresql.org/docs/current/datatype-xml.html

XML support in the MySQL engine:

https://dev.mysql.com/doc/refman/8.0/en/load-xml.html https://dev.mysql.com/doc/refman/8.0/en/xml-functions.html

johrss
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南