首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于Json的小型异构数据库同步策略研究
引用本文:黄志,李涛,宋瑶,苏传程.基于Json的小型异构数据库同步策略研究[J].气象研究与应用,2020(1):48-53.
作者姓名:黄志  李涛  宋瑶  苏传程
作者单位:广西区气象信息中心
基金项目:完善省级智能网格预报业务系统数据环境(桂气科2019M10);面向互联网应用的cimiss数据同步技术研究(2017M05)。
摘    要:针对不同气象业务系统所辖台站参数表在表字段不同的情况下,如何快速完成各个台站参数表之间的数据同步变更问题,本文提出了一种小型异构数据库同步方案。通过将数据库表名、表字段以及数据库连接信息封装为Json格式键值对配置文件,采用SQL列别名的方式完成对数据库表的查询;当元数据表参数信息发生变动时,通过对Json键值对顺序分解匹配,能准确定位元数据表和目标表各自对应的表字段,绑定其被修改的参数值,并自动生成SQL语句完成增删改操作。结果表明,基于Json的台站参数数据同步方式可简化开发框架并有效减低开发成本,快速建立各个异构数据库表的台站参数数据同步流程,通过在系统外部配置Json文件的方式可以降低后台代码的耦合度,有利于后期系统的管理和运维,具有良好的推广应用价值。

关 键 词:台站参数  同步  JSON  列别名

Research on synchronization strategy of small heterogeneous database based on Json
Huang Zhi,Li Tao,Song Yao,Su Chuancheng.Research on synchronization strategy of small heterogeneous database based on Json[J].Journal of Guangxi Meteorology,2020(1):48-53.
Authors:Huang Zhi  Li Tao  Song Yao  Su Chuancheng
Institution:(Guangxi Meteorological Information Center,Nanning Guangxi 530022)
Abstract:In order to solve the problem of how to quickly complete the data synchronization change among the parameter tables of different stations under the condition of different table fields in different meteorological business systems, this paper proposed a small heterogeneous database synchronization scheme. By encapsulating the database table name, table field and database connection information as Json format key value pair configuration file, SQL column alias was used to complete the query of the database table. When the parameter information of the source data table changed, the corresponding table fields and the target table could be accurately located, bounded to their modified parameter values, and automatically generate SQL statements to complete the operation of adding, deleting and modifying by decomposing and matching the order of the Json key value pair. The results showed that the way of data synchronization based on Json can simplify the development framework and reduce the development cost effectively, and quickly establish the process of data synchronization of various heterogeneous database tables. The way of configuring Json files outside the system can reduce the coupling degree of background code, which is conducive to the management, operation and maintenance of the later system, which has good application value.
Keywords:station parameters  synchronization  Json  column alias
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号