简体   繁体   中英

Transforming tables data into Jsons - what DB u choose for such task?

I have specific requirement for Json structures, meaning i get the Json structure (complex) one,

The required data to transform to Jsons lives in relational tables. The Volume is meaningful (can be million of Json based on much more of relational data).

I'm aware for how to build the Json by the tables relation for build a Json with sub elements as list/dict. till now, I had Oracle DB and use create dynamically the query for generating the Json i needed. it work perfectly i could create ANY json in any format.

Now there's decision to shift to an open source DB so Oracle is out. But I still have the data in tables. The challenge is to transform the tables into Json format with the most convenience way to maintain the transformation(due to changes in requirement for Json structure) and off course fast enough.

I start review the options - meaning relational tables with an easy option to represent the tables as Json.

Cassandra - it seems not really good choice as it quite challenging to handle those UDT which used for building a json, PostgreSQL - it seems the obvious choice but I guess maybe couldn't find an easy way to transform tables to json.

If your aim is to have data that easily translated to JSON in a database, I would heavily recommend shifting to noSQL and using MongoDB .

Mongo's document are already BSON (Binary JSONs) which makes it really easy to extract them as a JSON or to insert into the database from JSON files.

Do note that mongo is different from traditional SQL in many ways so it might require some research before truly committing to it. You could probably translate a relational DB to mongo without issues, but it might involve major changes in other parts of the system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM