WO2015188488A1 - Method and apparatus for generating database dictionary of word documents - Google Patents

Method and apparatus for generating database dictionary of word documents Download PDF

Info

Publication number
WO2015188488A1
WO2015188488A1 PCT/CN2014/086660 CN2014086660W WO2015188488A1 WO 2015188488 A1 WO2015188488 A1 WO 2015188488A1 CN 2014086660 W CN2014086660 W CN 2014086660W WO 2015188488 A1 WO2015188488 A1 WO 2015188488A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
application system
business application
system database
dictionary
Prior art date
Application number
PCT/CN2014/086660
Other languages
French (fr)
Chinese (zh)
Inventor
姜志强
孙放宽
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015188488A1 publication Critical patent/WO2015188488A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method and apparatus for generating a database dictionary of a word document.
  • the database needs to add tables or change the table structure during use.
  • database design developers must constantly update the word dictionary of the database dictionary, which is a arduous task.
  • the database design developer forgets to synchronously update the word document of the database dictionary, the description of the word document in the database dictionary is inconsistent with the structure in the actual database, thereby causing unnecessary trouble to the business application developers, testers and operators. .
  • the present invention aims to provide a method and a device for generating a database dictionary of a word document, which are used to solve the situation in the prior art for newly adding a table or changing a table structure, and the database design developer needs to continuously update and update.
  • the word document in the database dictionary causes an increase in the workload.
  • the embodiment of the present invention provides a method for automatically generating a database dictionary of a Word document, and the method includes:
  • the database dictionary of the business application system database is automatically updated by executing a preset structured query language sql statement supporting the business application system database query.
  • the establishing a connection with the business application system database specifically includes:
  • connection information connecting to the relational database corresponding to the business application system database according to the connection information, and further establishing a connection with the business application system database in the relational database.
  • connection information includes one or more of an IP address, a port, a login user name, and a password of the relational database.
  • the preset structured query language sql statement supporting the business application system database query specifically includes:
  • the sql statement for querying the table structure and the annotation of the business application system database is written by the database dictionary in the relational database corresponding to the business application system database.
  • the automatically updating the database dictionary of the business application system database by executing a preset structured query language sql statement that supports the query of the business application system database includes:
  • the business application system database comprises: an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
  • Another embodiment of the present invention further provides an apparatus for automatically generating a database dictionary of a Word document, the apparatus comprising:
  • connection module configured to establish a connection with a business application system database, where the business application system database includes a database dictionary that needs to update a Word document;
  • a generating module configured to automatically update the database dictionary of the business application system database by executing a preset structured query language sql statement supporting the business application system database query.
  • connection module is configured to connect with a relational database corresponding to the business application system database according to the connection information, and further establish a connection with the business application system database in the relational database.
  • connection information includes one or more of an IP address, a port, a login user name, and a password of the relational database.
  • the generating module is configured to: write, by using a database dictionary in a relational database corresponding to the business application system database, a SQL statement for querying a table structure and a comment of the business application system database, and automatically updating the The database dictionary of the business application system database.
  • the generating module is further configured to obtain, by executing a preset structured query language sql statement that supports the query of the business application system database, obtaining a table structure of the queryed business application system database and a result set of the annotation And collecting the result through the Word component, generating a Word document corresponding to the business application system database, and replacing the corresponding Word document in the database dictionary.
  • the business application system database comprises: an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
  • the embodiment of the invention establishes a connection with the business application system database of the database dictionary that needs to generate the Word document, and automatically updates the database dictionary of the Word document of the business application system database after executing the preset SQL statement, so that the database developer can synchronize the word from the database.
  • the database dictionary of the document is freed from labor, which effectively solves the problem of the new design of the table or the change of the table structure in the prior art, so that the database design developer needs to continuously update the word dictionary of the database dictionary, and the database design developer is aggravated. The problem of the workload.
  • FIG. 1 is a flowchart of a method for automatically generating a database dictionary of a Word document according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another method for automatically generating a database dictionary of a Word document according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for automatically generating a database dictionary of a Word document according to an embodiment of the present invention.
  • the main object of the embodiments of the present invention is to provide a method and a device for automatically generating a database dictionary of a Word document, and establishing a connection with a business application system database of a database dictionary that needs to generate a Word document.
  • the database dictionary of the Word document of the business application system database is automatically updated, so that the database developer can be freed from the laborious work of the database dictionary of the synchronous word document.
  • An embodiment of the present invention provides a method for automatically generating a database dictionary of a Word document. Referring to FIG. 1, the method includes:
  • S101 Establish a connection with a business application system database, where the business application system database includes a database dictionary that needs to update a Word document;
  • the invention executes the corresponding sql statement after establishing the connection with the business application system database, and then automatically updates the database dictionary of the Word document of the business application system database, thereby Enables database developers to free themselves from the tedious work of synchronizing word documents into database dictionaries.
  • the business application system database in the embodiment of the present invention may be an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, a software database of various industries, and the like.
  • connection information connecting to the relational database corresponding to the business application system database according to the connection information, and further establishing a connection with the business application system database in the relational database.
  • different types of business application system databases are respectively divided into different types of relational databases, and different database databases are set in different relational databases, and when used, the corresponding relational database types are first selected, and then further In the selected relational database type, select the business application system database that needs to generate the database dictionary of the Word document, and connect.
  • the relational database in the embodiment of the present invention specifically includes: oracle, mysql, sybase, and ms sql server.
  • the database connection information in the embodiment of the present invention includes the IP address and port of the relational database. If the business application system database has a login user name and password, the database connection information should also have a corresponding login user name and password information, of course, the field. The technical staff can also be based on the specific settings of the business application system database. To set up other database connection information to establish a connection with the business application system database of the database dictionary that needs to generate the Word document.
  • the sql statement for querying the table structure and the annotation of the business application system database is written by the database dictionary in the relational database corresponding to the business application system database.
  • the present invention uses the database dictionary of the relational database corresponding to the business application system database to write a table structure and annotations for querying the business application system database.
  • the statement, and the result returned by sql, using the word component, writes to the word document, and generates a business system database dictionary table word document that satisfies the format.
  • the database dictionary that automatically updates the business application system database by executing a preset structured query language sql statement that supports the query of the business application system database includes:
  • FIG. 2 is a flow chart of another method for automatically generating a database dictionary of a Word document according to an embodiment of the present invention. The present invention will be described in detail below with reference to FIG. 2:
  • the format of the configuration file is as follows: the brackets indicate the supported database type, and the following sql statement indicates the sql statement of the database dictionary that queries the business application system database.
  • the question mark in sql is a parameter that can be passed to the name of the business application system database. After entering, you can establish a business application system database connection.
  • S202 The user selects a corresponding relational database in the relational database type (oracle, mysql, sybase, ms sql server) drop-down selection box of the interface, and the system according to the input relational database connection information (ip address, port, login user name and password) Establishing a connection with the relational database, the system obtains a list of its business application system database according to the type of the relational database and returns it to the interface, and the user selects a business application system database of the database dictionary that needs to generate the word document, and the system establishes with the business application system database. connection;
  • S203 The user clicks a button for generating a word document, and the system reads the sql query statement of the corresponding business application system database in the configuration file, and inputs the selected business application system database name as a parameter, and after executing the sql, Returns a collection of results for the table structure and comments.
  • the embodiment of the present invention further provides an apparatus for automatically generating a database dictionary of a Word document.
  • the apparatus includes a connection module 11 and a generation module 12 connected to each other;
  • connection module 11 is configured to establish a connection with the business application system database, where the business application system database includes a database dictionary that needs to update the Word document;
  • the generating module 12 is configured to automatically update the database dictionary of the business application system database by executing a preset structured query language sql statement supporting the business application system database query.
  • connection module 11 is specifically configured to connect with a relational database corresponding to the business application system database according to the connection information, and further relate to the relationship.
  • the business application system database in the database establishes a connection.
  • the database connection information in the embodiment of the present invention includes one or more of an IP address, a port, a login user name, and a password of the relational database.
  • the generating module 12 in the embodiment of the present invention is further configured to: write, by using a database dictionary in a relational database corresponding to the business application system database, a sql statement for querying a table structure and a comment of the business application system database. Obtaining the table structure of the queryed business application system database and the result set of the annotation, and collecting the result set through the Word component to generate a Word document corresponding to the business application system database, replacing the corresponding corresponding in the database dictionary Word document.
  • the business application system database in the embodiment of the present invention includes: an online education database, an online mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
  • the related content of the device embodiment of the present invention is the same as the method embodiment, and the method embodiment is specifically referred to, and details are not described herein again.
  • the embodiment of the invention establishes a connection with the business application system database of the database dictionary that needs to generate the Word document, and automatically updates the database dictionary of the Word document of the business application system database after executing the preset SQL statement, so that the database developer can synchronize the word from the database.
  • the database dictionary of documents is freed from heavy labor.
  • the embodiment of the invention establishes a connection with the business application system database of the database dictionary that needs to generate the Word document, and automatically updates the database dictionary of the Word document of the business application system database after executing the preset SQL statement, so that the database developer can synchronize the word from the database.
  • the database dictionary of the document is freed from labor, which effectively solves the problem of the new design of the table or the change of the table structure in the prior art, so that the database design developer needs to continuously update the word dictionary of the database dictionary, and the database design developer is aggravated. The problem of the workload.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a method and apparatus for generating a database dictionary of Word documents, the method comprising: establishing a connection with a service application system database comprising a database dictionary in which Word documents need to be updated (S101), and then automatically updating the database dictionary of the service application system database by executing preset structured query language sql statements supporting query for the service application system database (S102). A connection with the service application system database requiring generation of the database dictionary of Word documents is established and then the database dictionary of Word documents in the service application system database is automatically updated by executing preset sql statements, so that database developers can be relieved from laborious work of synchronization of the database dictionary of Word documents.

Description

一种生成word文档的数据库字典的方法及装置Method and device for generating database dictionary of word document 技术领域Technical field
本发明涉及计算机技术领域,尤其涉及一种生成word文档的数据库字典的方法及装置。The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for generating a database dictionary of a word document.
背景技术Background technique
由于种种原因,数据库在使用过程中需要增加表或进行表结构变更等,例如,在在线教育的研发过程中,由于需求多、升级快,经常需要新增加表或者进行表结构变更,这就使得数据库设计开发人员除了设计编写数据库脚本之外,还得不断同步更新数据库字典的word文档,任务繁重。而且如果数据库设计开发人员忘记同步更新数据库字典的word文档,会导致数据库字典中的word文档的描述和实际数据库中的结构不一致,从而给业务应用开发人员、测试人员以及运营人员造成不必要的麻烦。For various reasons, the database needs to add tables or change the table structure during use. For example, in the development process of online education, due to the high demand and rapid upgrade, it is often necessary to add a new table or change the table structure, which makes In addition to designing and writing database scripts, database design developers must constantly update the word dictionary of the database dictionary, which is a arduous task. Moreover, if the database design developer forgets to synchronously update the word document of the database dictionary, the description of the word document in the database dictionary is inconsistent with the structure in the actual database, thereby causing unnecessary trouble to the business application developers, testers and operators. .
发明内容Summary of the invention
鉴于上述的分析,本发明旨在提供一种生成word文档的数据库字典的方法及装置,用以解决现有技术中针对新增加表或进行表结构变更等情况,数据库设计开发人员需要不断同步更新数据库字典中的word文档而导致加重工作量的问题。In view of the above analysis, the present invention aims to provide a method and a device for generating a database dictionary of a word document, which are used to solve the situation in the prior art for newly adding a table or changing a table structure, and the database design developer needs to continuously update and update. The word document in the database dictionary causes an increase in the workload.
为解决上述问题,本发明实施例主要是通过以下技术方案实现的:本发明实施例提供了一种自动生成Word文档的数据库字典的方法,该方法包括:In order to solve the above problem, the embodiment of the present invention is mainly implemented by the following technical solutions: The embodiment of the present invention provides a method for automatically generating a database dictionary of a Word document, and the method includes:
与业务应用系统数据库建立连接,所述业务应用系统数据库中包含需要更新Word文档的数据库字典;Establishing a connection with the business application system database, where the business application system database includes a database dictionary that needs to update the Word document;
通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典。The database dictionary of the business application system database is automatically updated by executing a preset structured query language sql statement supporting the business application system database query.
优选地,所述与业务应用系统数据库建立连接具体包括:Preferably, the establishing a connection with the business application system database specifically includes:
根据连接信息与所述业务应用系统数据库相对应的关系数据库连接,再进一步与所述关系数据库中的所述业务应用系统数据库建立连接。 And connecting to the relational database corresponding to the business application system database according to the connection information, and further establishing a connection with the business application system database in the relational database.
优选地,所述连接信息包括:关系数据库的IP地址、端口、登录用户名及密码中的一种或多种。Preferably, the connection information includes one or more of an IP address, a port, a login user name, and a password of the relational database.
优选地,所述预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句具体包括:Preferably, the preset structured query language sql statement supporting the business application system database query specifically includes:
通过与所述业务应用系统数据库相对应的关系数据库中的数据库字典,编写用于查询该业务应用系统数据库的表结构及注释的sql语句。The sql statement for querying the table structure and the annotation of the business application system database is written by the database dictionary in the relational database corresponding to the business application system database.
优选地,所述通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典具体包括:Preferably, the automatically updating the database dictionary of the business application system database by executing a preset structured query language sql statement that supports the query of the business application system database includes:
通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,获取查询到的所述业务应用系统数据库的表结构和注释的结果集合,并将所述结果集合通过Word组件,生成所述业务应用系统数据库对应的Word文档,替换掉所述数据库字典中相应的Word文档。Obtaining a table set of the queryed business application system database and a result set of the annotation by executing a preset structured query language sql statement supporting the business application system database query, and collecting the result set through the Word component. Generating a Word document corresponding to the business application system database, and replacing the corresponding Word document in the database dictionary.
优选地,所述业务应用系统数据库包括:在线教育数据库、在线商城数据库、即时通讯数据库、社交网络数据库、企业管理信息数据库和各行业的软件数据库。Preferably, the business application system database comprises: an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
本发明另一个实施例还提供了一种自动生成Word文档的数据库字典的装置,该装置包括:Another embodiment of the present invention further provides an apparatus for automatically generating a database dictionary of a Word document, the apparatus comprising:
连接模块,设置为与业务应用系统数据库建立连接,所述业务应用系统数据库中包含需要更新Word文档的数据库字典;a connection module, configured to establish a connection with a business application system database, where the business application system database includes a database dictionary that needs to update a Word document;
生成模块,设置为通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典。And a generating module, configured to automatically update the database dictionary of the business application system database by executing a preset structured query language sql statement supporting the business application system database query.
优选地,所述连接模块设置为,根据连接信息与所述业务应用系统数据库相对应的关系数据库连接,再进一步与所述关系数据库中的所述业务应用系统数据库建立连接。Preferably, the connection module is configured to connect with a relational database corresponding to the business application system database according to the connection information, and further establish a connection with the business application system database in the relational database.
优选地,所述连接信息包括:关系数据库的IP地址、端口、登录用户名及密码中的一种或多种。Preferably, the connection information includes one or more of an IP address, a port, a login user name, and a password of the relational database.
优选地,所述生成模块设置为,通过与所述业务应用系统数据库相对应的关系数据库中的数据库字典,编写用于查询该业务应用系统数据库的表结构及注释的sql语句,自动更新所述业务应用系统数据库的所述数据库字典。 Preferably, the generating module is configured to: write, by using a database dictionary in a relational database corresponding to the business application system database, a SQL statement for querying a table structure and a comment of the business application system database, and automatically updating the The database dictionary of the business application system database.
优选地,所述生成模块还设置为,通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,获取查询到的所述业务应用系统数据库的表结构和注释的结果集合,并将所述结果集合通过Word组件,生成所述业务应用系统数据库对应的Word文档,替换掉所述数据库字典中相应的Word文档。Preferably, the generating module is further configured to obtain, by executing a preset structured query language sql statement that supports the query of the business application system database, obtaining a table structure of the queryed business application system database and a result set of the annotation And collecting the result through the Word component, generating a Word document corresponding to the business application system database, and replacing the corresponding Word document in the database dictionary.
优选地,所述业务应用系统数据库包括:在线教育数据库、在线商城数据库、即时通讯数据库、社交网络数据库、企业管理信息数据库和各行业的软件数据库。Preferably, the business application system database comprises: an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
本发明实施例有益效果如下:The beneficial effects of the embodiments of the present invention are as follows:
本发明实施例通过与需要生成Word文档的数据库字典的业务应用系统数据库建立连接,执行预设的sql语句后,自动更新业务应用系统数据库的Word文档的数据库字典,使数据库开发人员能够从同步word文档的数据库字典繁重劳动中解放出来,从而有效解决了现有技术中由于新增加表或进行表结构变更等情况,使数据库设计开发人员需要不断同步更新数据库字典的word文档,加重数据库设计开发人员的工作量的问题。The embodiment of the invention establishes a connection with the business application system database of the database dictionary that needs to generate the Word document, and automatically updates the database dictionary of the Word document of the business application system database after executing the preset SQL statement, so that the database developer can synchronize the word from the database. The database dictionary of the document is freed from labor, which effectively solves the problem of the new design of the table or the change of the table structure in the prior art, so that the database design developer needs to continuously update the word dictionary of the database dictionary, and the database design developer is aggravated. The problem of the workload.
本发明的其他特征和优点将在随后的说明书中阐述,并且部分的从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the invention will be set forth in the description in the description which follows. The objectives and other advantages of the invention may be realized and obtained by means of the structure particularly pointed in the appended claims.
附图说明DRAWINGS
图1为本发明实施例的自动生成Word文档的数据库字典的方法的流程图;1 is a flowchart of a method for automatically generating a database dictionary of a Word document according to an embodiment of the present invention;
图2为本发明实施例的另一种自动生成Word文档的数据库字典的方法的流程图;2 is a flowchart of another method for automatically generating a database dictionary of a Word document according to an embodiment of the present invention;
图3为本发明实施例的自动生成Word文档的数据库字典的装置的结构示意图。FIG. 3 is a schematic structural diagram of an apparatus for automatically generating a database dictionary of a Word document according to an embodiment of the present invention.
具体实施方式detailed description
下面结合附图来具体描述本发明的优选实施例,其中,附图构成本申请一部分,并与本发明的实施例一起用于阐释本发明的原理。为了清楚和简化目的,当其可能使本发明的主题模糊不清时,将省略本文所描述的器件中已知功能和结构的详细具体说明。The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings, in which FIG. For the sake of clarity and simplicity, detailed descriptions of known functions and structures in the devices described herein will be omitted when they may obscure the subject matter of the present invention.
本发明实施例的主要目的是提供一种自动生成Word文档的数据库字典的方法及装置,通过与需要生成Word文档的数据库字典的业务应用系统数据库建立连接,执 行预设的sql语句后,自动更新业务应用系统数据库的Word文档的数据库字典,使数据库开发人员能够从同步word文档的数据库字典繁重劳动中解放出来。下面就通过几个具体实施例对本发明的技术方案进行详细说明。The main object of the embodiments of the present invention is to provide a method and a device for automatically generating a database dictionary of a Word document, and establishing a connection with a business application system database of a database dictionary that needs to generate a Word document. After the default SQL statement, the database dictionary of the Word document of the business application system database is automatically updated, so that the database developer can be freed from the laborious work of the database dictionary of the synchronous word document. The technical solutions of the present invention will be described in detail below through several specific embodiments.
本发明实施例提供了一种自动生成Word文档的数据库字典的方法,参见图1,包括:An embodiment of the present invention provides a method for automatically generating a database dictionary of a Word document. Referring to FIG. 1, the method includes:
S101、与业务应用系统数据库建立连接,所述业务应用系统数据库中包含需要更新Word文档的数据库字典;S101: Establish a connection with a business application system database, where the business application system database includes a database dictionary that needs to update a Word document;
S102、通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言(Structured Query Language,sql)语句,自动更新所述业务应用系统数据库的所述数据库字典。S102. Automatically update the database dictionary of the business application system database by executing a preset Structured Query Language (sql) statement that supports the business application system database query.
本发明通过预设支持不同业务应用系统数据库查询的数据库字典的sql语句,在与业务应用系统数据库建立连接后,执行相应的sql语句,然后自动更新业务应用系统数据库的Word文档的数据库字典,从而使数据库开发人员能够从同步word文档的数据库字典的繁重劳动中解放出来。By presetting the sql statement supporting the database dictionary of different business application system database query, the invention executes the corresponding sql statement after establishing the connection with the business application system database, and then automatically updates the database dictionary of the Word document of the business application system database, thereby Enables database developers to free themselves from the tedious work of synchronizing word documents into database dictionaries.
本发明实施例中的业务应用系统数据库可以为在线教育数据库、在线商城数据库、即时通讯数据库、社交网络数据库、企业管理信息数据库和各行业的软件数据库等等。The business application system database in the embodiment of the present invention may be an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, a software database of various industries, and the like.
本发明实施例中的所述与业务应用系统数据库建立连接具体包括:The establishing the connection with the business application system database in the embodiment of the present invention specifically includes:
根据连接信息与所述业务应用系统数据库相对应的关系数据库连接,再进一步与所述关系数据库中的所述业务应用系统数据库建立连接。And connecting to the relational database corresponding to the business application system database according to the connection information, and further establishing a connection with the business application system database in the relational database.
本发明实施例将不同类型的业务应用系统数据库分别划分到不同类型的关系数据库中,且不同的关系数据库中的分别设置不同的数据库字典,使用时,首先选择相应的关系数据库类型,再进一步在选择的关系数据库类型中选择需要生成Word文档的数据库字典的业务应用系统数据库,并进行连接。In the embodiment of the present invention, different types of business application system databases are respectively divided into different types of relational databases, and different database databases are set in different relational databases, and when used, the corresponding relational database types are first selected, and then further In the selected relational database type, select the business application system database that needs to generate the database dictionary of the Word document, and connect.
本发明实施例中的关系型数据库具体包括:oracle、mysql、sybase和ms sql server等。The relational database in the embodiment of the present invention specifically includes: oracle, mysql, sybase, and ms sql server.
本发明实施例中的数据库连接信息包括关系数据库的IP地址和端口,如果业务应用系统数据库设有登录用户名和密码,则数据库连接信息中还应设有相应的登录用户名和密码信息,当然本领域的技术人员也可以根据业务应用系统数据库的具体设置, 来设置其他的数据库连接信息,以与需要生成Word文档的数据库字典的业务应用系统数据库建立连接。The database connection information in the embodiment of the present invention includes the IP address and port of the relational database. If the business application system database has a login user name and password, the database connection information should also have a corresponding login user name and password information, of course, the field. The technical staff can also be based on the specific settings of the business application system database. To set up other database connection information to establish a connection with the business application system database of the database dictionary that needs to generate the Word document.
本发明实施例中的所述预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句具体包括:The preset structured query language sql statement supporting the query of the business application system database in the embodiment of the present invention specifically includes:
通过与所述业务应用系统数据库相对应的关系数据库中的数据库字典,编写用于查询该业务应用系统数据库的表结构及注释的sql语句。The sql statement for querying the table structure and the annotation of the business application system database is written by the database dictionary in the relational database corresponding to the business application system database.
由于不同的关系数据库的数据库字典记录方式不一样,不同的关系数据库又分别包括不同的业务应用系统数据库,而不同的关系数据库都有自己的查询sql,但返回的结果结构是一样的。因此需要给支持的各类关系数据库量身定制编写对应sql,所以,本发明利用与业务应用系统数据库相对应的关系数据库的数据库字典来编写查询该业务应用系统数据库的表结构及注释等的sql语句,并将sql返回的结果,利用word组件,写到word文档中,生成满足格式的业务系统数据库字典表word文档。Because the database dictionary records of different relational databases are different, different relational databases respectively include different business application system databases, and different relational databases have their own query sql, but the returned result structure is the same. Therefore, it is necessary to tailor the corresponding sql to the supported relational databases. Therefore, the present invention uses the database dictionary of the relational database corresponding to the business application system database to write a table structure and annotations for querying the business application system database. The statement, and the result returned by sql, using the word component, writes to the word document, and generates a business system database dictionary table word document that satisfies the format.
本发明实施例中的所述通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典具体包括:In the embodiment of the present invention, the database dictionary that automatically updates the business application system database by executing a preset structured query language sql statement that supports the query of the business application system database includes:
通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,获取查询到的所述业务应用系统数据库的表结构和注释的结果集合,并将所述结果集合通过Word组件,生成所述业务应用系统数据库对应的Word文档,替换掉所述数据库字典中相应的Word文档。Obtaining a table set of the queryed business application system database and a result set of the annotation by executing a preset structured query language sql statement supporting the business application system database query, and collecting the result set through the Word component. Generating a Word document corresponding to the business application system database, and replacing the corresponding Word document in the database dictionary.
如果没有预设查询注释的sql语句,或者该业务应用系统数据库中不存在查询的注释,该结果集合中也可以没有注释。If there is no sql statement that presets the query comment, or there is no comment for the query in the business application system database, there is no comment in the result set.
图2是本发明实施例的另一种自动生成Word文档的数据库字典的方法的流程图,下面结合图2来对本发明进行详细说明:2 is a flow chart of another method for automatically generating a database dictionary of a Word document according to an embodiment of the present invention. The present invention will be described in detail below with reference to FIG. 2:
S201、配置支持业务应用系统数据库类型及查询的数据库字典的sql语句。S201: Configuring a SQL statement supporting a business application system database type and a query database dictionary.
配置文件内容格式如下:其中中括号表示支持的数据库类型,下面的sql语句表示查询该业务应用系统数据库的数据库字典的sql语句,sql中的问号是一个可以传入业务应用系统数据库名字的参数,输入后可建立业务应用系统数据库连接。The format of the configuration file is as follows: the brackets indicate the supported database type, and the following sql statement indicates the sql statement of the database dictionary that queries the business application system database. The question mark in sql is a parameter that can be passed to the name of the business application system database. After entering, you can establish a business application system database connection.
1)[mysql]1)[mysql]
Figure PCTCN2014086660-appb-000001
Figure PCTCN2014086660-appb-000001
Figure PCTCN2014086660-appb-000002
Figure PCTCN2014086660-appb-000002
2)[oracle]2)[oracle]
查询oracle数据库字典的sql语句;Query the sql statement of the oracle database dictionary;
3)[sybase]3) [sybase]
查询sybase数据库字典的sql语句;Query the sql statement of the Sybase database dictionary;
4)[mssqlserver]4) [mssqlserver]
查询ms sql server数据库字典的sql语句。Query the sql statement of the ms sql server database dictionary.
S202、用户在界面的关系数据库类型(oracle、mysql、sybase、ms sql server)下拉选择框中选择相应的关系数据库,系统根据输入的关系数据库的连接信息(ip地址、端口、登录用户名及密码)与该关系数据库建立连接,系统依据关系数据库的类型获取其业务应用系统数据库的列表返回给界面,用户再选择需要生成word文档的数据库字典的业务应用系统数据库,系统与该业务应用系统数据库建立连接;S202: The user selects a corresponding relational database in the relational database type (oracle, mysql, sybase, ms sql server) drop-down selection box of the interface, and the system according to the input relational database connection information (ip address, port, login user name and password) Establishing a connection with the relational database, the system obtains a list of its business application system database according to the type of the relational database and returns it to the interface, and the user selects a business application system database of the database dictionary that needs to generate the word document, and the system establishes with the business application system database. connection;
S203、用户点击生成word文档的按钮,系统此时读取配置文件里面对应的业务应用系统数据库的sql查询语句,并将所选的业务应用系统数据库名字做为参数传入,执行该sql之后,会返回表结构和注释的结果集合。 S203: The user clicks a button for generating a word document, and the system reads the sql query statement of the corresponding business application system database in the configuration file, and inputs the selected business application system database name as a parameter, and after executing the sql, Returns a collection of results for the table structure and comments.
S204、系统最后将上述结果集合通过word组件,写入生成数据库字典word文档。S204. The system finally writes the above result set through the word component, and writes the generated database dictionary word document.
S205、使用者使用更新后的数据库字典。S205. The user uses the updated database dictionary.
本发明实施例还提供了一种自动生成Word文档的数据库字典的装置,参见图3,该装置包括相互连接的连接模块11和生成模块12;The embodiment of the present invention further provides an apparatus for automatically generating a database dictionary of a Word document. Referring to FIG. 3, the apparatus includes a connection module 11 and a generation module 12 connected to each other;
连接模块11,设置为与业务应用系统数据库建立连接,所述业务应用系统数据库中包含需要更新Word文档的数据库字典;The connection module 11 is configured to establish a connection with the business application system database, where the business application system database includes a database dictionary that needs to update the Word document;
生成模块12,设置为通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典。The generating module 12 is configured to automatically update the database dictionary of the business application system database by executing a preset structured query language sql statement supporting the business application system database query.
本发明实施例还提供了一种优选的连接模块11,具体的,所述连接模块11具体设置为,根据连接信息与所述业务应用系统数据库相对应的关系数据库连接,再进一步与所述关系数据库中的所述业务应用系统数据库建立连接。The embodiment of the present invention further provides a preferred connection module 11. Specifically, the connection module 11 is specifically configured to connect with a relational database corresponding to the business application system database according to the connection information, and further relate to the relationship. The business application system database in the database establishes a connection.
本发明实施例中的所述数据库连接信息包括:关系数据库的IP地址、端口、登录用户名及密码中的一种或多种。The database connection information in the embodiment of the present invention includes one or more of an IP address, a port, a login user name, and a password of the relational database.
本发明实施例中的所述生成模块12还设置为,通过与所述业务应用系统数据库相对应的关系数据库中的数据库字典,编写用于查询该业务应用系统数据库的表结构及注释的sql语句,获取查询到的所述业务应用系统数据库的表结构和注释的结果集合,并将所述结果集合通过Word组件,生成所述业务应用系统数据库对应的Word文档,替换掉所述数据库字典中相应的Word文档。The generating module 12 in the embodiment of the present invention is further configured to: write, by using a database dictionary in a relational database corresponding to the business application system database, a sql statement for querying a table structure and a comment of the business application system database. Obtaining the table structure of the queryed business application system database and the result set of the annotation, and collecting the result set through the Word component to generate a Word document corresponding to the business application system database, replacing the corresponding corresponding in the database dictionary Word document.
本发明实施例中的所述业务应用系统数据库包括:在线教育数据库、在线商城数据库、即时通讯数据库、社交网络数据库、企业管理信息数据库和各行业的软件数据库。The business application system database in the embodiment of the present invention includes: an online education database, an online mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
本发明装置实施例的相关内容与方法实施例相同,具体可参照方法实施例,在此不再赘述。The related content of the device embodiment of the present invention is the same as the method embodiment, and the method embodiment is specifically referred to, and details are not described herein again.
本发明实施例提供的一种自动生成Word文档的数据库字典的方法及装置,能够带来以下有益效果:The method and device for automatically generating a database dictionary of a Word document provided by the embodiments of the present invention can bring the following beneficial effects:
本发明实施例通过与需要生成Word文档的数据库字典的业务应用系统数据库建立连接,执行预设的sql语句后,自动更新业务应用系统数据库的Word文档的数据库字典,使数据库开发人员能够从同步word文档的数据库字典繁重劳动中解放出来。 The embodiment of the invention establishes a connection with the business application system database of the database dictionary that needs to generate the Word document, and automatically updates the database dictionary of the Word document of the business application system database after executing the preset SQL statement, so that the database developer can synchronize the word from the database. The database dictionary of documents is freed from heavy labor.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed by the present invention. Alternatives are intended to be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.
工业实用性Industrial applicability
本发明实施例通过与需要生成Word文档的数据库字典的业务应用系统数据库建立连接,执行预设的sql语句后,自动更新业务应用系统数据库的Word文档的数据库字典,使数据库开发人员能够从同步word文档的数据库字典繁重劳动中解放出来,从而有效解决了现有技术中由于新增加表或进行表结构变更等情况,使数据库设计开发人员需要不断同步更新数据库字典的word文档,加重数据库设计开发人员的工作量的问题。 The embodiment of the invention establishes a connection with the business application system database of the database dictionary that needs to generate the Word document, and automatically updates the database dictionary of the Word document of the business application system database after executing the preset SQL statement, so that the database developer can synchronize the word from the database. The database dictionary of the document is freed from labor, which effectively solves the problem of the new design of the table or the change of the table structure in the prior art, so that the database design developer needs to continuously update the word dictionary of the database dictionary, and the database design developer is aggravated. The problem of the workload.

Claims (12)

  1. 一种自动生成Word文档的数据库字典的方法,包括:A method for automatically generating a database dictionary of a Word document, comprising:
    与业务应用系统数据库建立连接,所述业务应用系统数据库中包含需要更新Word文档的数据库字典;Establishing a connection with the business application system database, where the business application system database includes a database dictionary that needs to update the Word document;
    通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典。The database dictionary of the business application system database is automatically updated by executing a preset structured query language sql statement supporting the business application system database query.
  2. 根据权利要求1所述的方法,其中,所述与业务应用系统数据库建立连接具体包括:The method of claim 1, wherein the establishing a connection with the business application system database specifically comprises:
    根据连接信息与所述业务应用系统数据库相对应的关系数据库连接,再进一步与所述关系数据库中的所述业务应用系统数据库建立连接。And connecting to the relational database corresponding to the business application system database according to the connection information, and further establishing a connection with the business application system database in the relational database.
  3. 根据权利要求2所述的方法,其中,所述连接信息包括:关系数据库的IP地址、端口、登录用户名及密码中的一种或多种。The method of claim 2, wherein the connection information comprises one or more of an IP address, a port, a login user name, and a password of the relational database.
  4. 根据权利要求1所述的方法,其中,所述预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句具体包括:The method according to claim 1, wherein the predetermined structured query language sql statement supporting the business application system database query specifically comprises:
    通过与所述业务应用系统数据库相对应的关系数据库中的数据库字典,编写用于查询该业务应用系统数据库的表结构及注释的sql语句。The sql statement for querying the table structure and the annotation of the business application system database is written by the database dictionary in the relational database corresponding to the business application system database.
  5. 根据权利要求1所述的方法,其中,所述通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典具体包括:The method according to claim 1, wherein the automatically updating the database dictionary of the business application system database by executing a predetermined structured query language sql statement that supports the business application system database query comprises:
    通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,获取查询到的所述业务应用系统数据库的表结构和注释的结果集合,并将所述结果集合通过Word组件,生成所述业务应用系统数据库对应的Word文档,替换掉所述数据库字典中相应的Word文档。Obtaining a table set of the queryed business application system database and a result set of the annotation by executing a preset structured query language sql statement supporting the business application system database query, and collecting the result set through the Word component. Generating a Word document corresponding to the business application system database, and replacing the corresponding Word document in the database dictionary.
  6. 根据权利要求1-5中任意一项所述的方法,其中,A method according to any one of claims 1 to 5, wherein
    所述业务应用系统数据库包括:在线教育数据库、在线商城数据库、即时通讯数据库、社交网络数据库、企业管理信息数据库和各行业的软件数据库。The business application system database includes: an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
  7. 一种自动生成Word文档的数据库字典的装置,包括: A device for automatically generating a database dictionary of a Word document, comprising:
    连接模块,设置为与业务应用系统数据库建立连接,所述业务应用系统数据库中包含需要更新Word文档的数据库字典;a connection module, configured to establish a connection with a business application system database, where the business application system database includes a database dictionary that needs to update a Word document;
    生成模块,设置为通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,自动更新所述业务应用系统数据库的所述数据库字典。And a generating module, configured to automatically update the database dictionary of the business application system database by executing a preset structured query language sql statement supporting the business application system database query.
  8. 根据权利要求7所述的装置,其中,The apparatus according to claim 7, wherein
    所述连接模块设置为,根据连接信息与所述业务应用系统数据库相对应的关系数据库连接,再进一步与所述关系数据库中的所述业务应用系统数据库建立连接。The connection module is configured to connect with a relational database corresponding to the business application system database according to the connection information, and further establish a connection with the business application system database in the relational database.
  9. 根据权利要求8所述的装置,其中,所述连接信息包括:关系数据库的IP地址、端口、登录用户名及密码中的一种或多种。The apparatus of claim 8, wherein the connection information comprises one or more of an IP address, a port, a login user name, and a password of a relational database.
  10. 根据权利要求7所述的装置,其中,The apparatus according to claim 7, wherein
    所述生成模块设置为,通过与所述业务应用系统数据库相对应的关系数据库中的数据库字典,编写用于查询该业务应用系统数据库的表结构及注释的sql语句,自动更新所述业务应用系统数据库的所述数据库字典。The generating module is configured to, by using a database dictionary in a relational database corresponding to the business application system database, write a sql statement for querying a table structure and a comment of the business application system database, and automatically updating the business application system. The database dictionary of the database.
  11. 根据权利要求7所述的装置,其中,The apparatus according to claim 7, wherein
    所述生成模块还设置为,通过执行预设的支持所述业务应用系统数据库查询的结构化查询语言sql语句,获取查询到的所述业务应用系统数据库的表结构和注释的结果集合,并将所述结果集合通过Word组件,生成所述业务应用系统数据库对应的Word文档,替换掉所述数据库字典中相应的Word文档。The generating module is further configured to: obtain, by using a preset structured query language sql statement that supports the query of the business application system database, obtain a table set of the queryed business application system database and a result set of the annotation, and The result set is generated by the Word component, and the Word document corresponding to the business application system database is generated, and the corresponding Word document in the database dictionary is replaced.
  12. 根据权利要求7-11中任意一项所述的装置,其中,A device according to any one of claims 7-11, wherein
    所述业务应用系统数据库包括:在线教育数据库、在线商城数据库、即时通讯数据库、社交网络数据库、企业管理信息数据库和各行业的软件数据库。 The business application system database includes: an online education database, an online shopping mall database, an instant messaging database, a social network database, an enterprise management information database, and a software database of various industries.
PCT/CN2014/086660 2014-06-12 2014-09-16 Method and apparatus for generating database dictionary of word documents WO2015188488A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410258837.6 2014-06-12
CN201410258837.6A CN105205060A (en) 2014-06-12 2014-06-12 Method and device for generating word document database dictionary

Publications (1)

Publication Number Publication Date
WO2015188488A1 true WO2015188488A1 (en) 2015-12-17

Family

ID=54832795

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/086660 WO2015188488A1 (en) 2014-06-12 2014-09-16 Method and apparatus for generating database dictionary of word documents

Country Status (2)

Country Link
CN (1) CN105205060A (en)
WO (1) WO2015188488A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416938A (en) * 2020-11-25 2021-02-26 深圳集智数字科技有限公司 Database dictionary generation method, device, equipment and storage medium
CN112507011A (en) * 2020-12-16 2021-03-16 江苏龙虎网信息科技股份有限公司 Method for establishing program automation database model

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897573A (en) * 2020-05-28 2020-11-06 广州市玄武无线科技股份有限公司 Method, device and equipment for generating database dictionary document and storage medium
CN112000690B (en) * 2020-08-19 2024-03-19 北京人大金仓信息技术股份有限公司 Method and device for analyzing structured operation statement

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495832A (en) * 2011-12-12 2012-06-13 方正国际软件有限公司 System for automatically generating document in software development process
CN102682035A (en) * 2011-03-18 2012-09-19 富泰华工业(深圳)有限公司 Data management method and system
CN102722540A (en) * 2012-05-23 2012-10-10 中兴通讯股份有限公司 Method and device for processing data in real-time memory database system
CN103067483A (en) * 2012-12-25 2013-04-24 广东邮电职业技术学院 Remote data increment synchronization method and device based on data package

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SE506853C2 (en) * 1996-06-20 1998-02-16 Anonymity Prot In Sweden Ab Method of data processing
CN1351299A (en) * 2000-10-28 2002-05-29 深圳市中兴通讯股份有限公司 Method and device for accessing database
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682035A (en) * 2011-03-18 2012-09-19 富泰华工业(深圳)有限公司 Data management method and system
CN102495832A (en) * 2011-12-12 2012-06-13 方正国际软件有限公司 System for automatically generating document in software development process
CN102722540A (en) * 2012-05-23 2012-10-10 中兴通讯股份有限公司 Method and device for processing data in real-time memory database system
CN103067483A (en) * 2012-12-25 2013-04-24 广东邮电职业技术学院 Remote data increment synchronization method and device based on data package

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416938A (en) * 2020-11-25 2021-02-26 深圳集智数字科技有限公司 Database dictionary generation method, device, equipment and storage medium
CN112416938B (en) * 2020-11-25 2024-02-09 深圳集智数字科技有限公司 Database dictionary generation method, device, equipment and storage medium
CN112507011A (en) * 2020-12-16 2021-03-16 江苏龙虎网信息科技股份有限公司 Method for establishing program automation database model

Also Published As

Publication number Publication date
CN105205060A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
US11507583B2 (en) Tuple extraction using dynamically generated extractor classes
WO2015188488A1 (en) Method and apparatus for generating database dictionary of word documents
CN108572996A (en) Synchronous method, device, electronic equipment and the storage medium of database table structure
US9189515B1 (en) Data retrieval from heterogeneous storage systems
CN104965735A (en) Apparatus for generating upgrade SQL script
CN109376153B (en) System and method for writing data into graph database based on NiFi
US10296505B2 (en) Framework for joining datasets
WO2016074370A1 (en) Keyvalue database data table updating method and data table updating device
CN103729463A (en) Method for implementing full-text retrieval based on Lucene and Solr
US9514173B2 (en) Real-time index consistency check
US11675690B2 (en) Lineage-driven source code generation for building, testing, deploying, and maintaining data marts and data pipelines
WO2024001493A1 (en) Visual data analysis method and device
CN112084208A (en) Data visualization method and system, storage medium and electronic device
US10942732B1 (en) Integration test framework
JP2014010667A (en) Provide an operation management support apparatus, method and program
Zou et al. From a stream of relational queries to distributed stream processing
CN105718468A (en) Method and device for building ODS layer of data warehouse
CN114385733A (en) Method and device for uniformly creating data model in ETL (extract transform and load) process
US20210240730A1 (en) Selective synchronization of database objects
US9146958B2 (en) System and method for report to report generation
CN116303461A (en) Component library creation method and device, electronic equipment and storage medium
CN112783980B (en) Data synchronous processing method, device, electronic equipment and computer readable medium
CN104778253A (en) Method and device for providing data
JP5877488B1 (en) RDB system
US20170161359A1 (en) Pattern-driven data generator

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14894766

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14894766

Country of ref document: EP

Kind code of ref document: A1