Effective programmer reading NOTE 2: automatically generate database documents using schemaspy

Source: Internet
Author: User

What is worse than no document? Document expired. If there is no document, you will try to figure it out in other ways, and outdated documents will mislead you. How can documents andCode/Database structure synchronization? Hope developers can maintain their own documents? It is estimated that the difficulty is only less than that of China's World Cup. What should I do? Automatically generate documents.ProgramSoftware writing by members is not designed to help users improve their work efficiency. Of course, they can also use tools to solve their own problems. Schemaspy is such a tool that can automatically generate documents from the database schema.

There is an article on the blogArticleI will not go into details about how to use schemaspy to create a database document. The following describes several problems I encountered during usage:

1. When Microsoft officially works with JDBC and SQL Server, jtds is recommended for unsupported variant data types. For more information, see database documentation using schemaspy.

2 The SQL statement used to extract sqlserver schema in schemaspy is incompatible with SQL server2005. You need to modify it. The sysproperties table used in the original SQL statement in MSSQL. properties does not exist in sqlserver2005. It is replaced by the SYS. extended_properties table and the column name is also changed. For details, refer to the article "getting all sqlserver database dictionaries with three simple SQL views".

3 schemaspy generated document is ISO-8859-1 by default, Chinese display is garbled, need to develop parameters-charset UTF-8. the strange thing is that schemaspy's help and usage on the home page did not mention this. I found this option in the source code. it turns out that this is the benefit of open source.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.