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.