The Feasibility of using mongodb to store Interface data

Hello everyone, the latest project needs to be docked with the interface of a mall, simply to call their various interfaces, such as ordering, commodity inquiry, freight and so on.

in accordance with the previous practice, in order to facilitate statistical analysis, we will use mysql, to create new tables and various fields to store the returned data. However, the format of the return parameters of different interfaces is different, which may lead to the need to create a large number of tables to solve the storage problem; if only one field is used to store the core parameters of the interface (json format), it will become very difficult to facilitate statistical analysis.

does using mongodb to store interface data make things easier, as mongodb uses json to store data and supports rich query expressions. Can the great gods who have used talk about the feasibility of this scheme, or is there a better plan for the storage, processing and analysis of interface data?

Mar.02,2021

you can also use caching, such as redis


it is personally understood that the returned results of the interface will be written to the business system, and a large number of queries should not be made later based on the returned results of the log.

the json type is supported after mysql 5.7. you can study whether it can meet the needs of query statistics you mentioned.
mongodb is not familiar, but I remember to suggest that the schema in the same collection is consistent. If you build multiple collection, and mysql build multiple tables, there is no difference.

Menu