gpt4 book ai didi

java - 可视化 sqlite 数据库模式

转载 作者:IT王子 更新时间:2023-10-29 06:28:06 27 4
gpt4 key购买 nike

我正在尝试可视化 sqlite 数据库。有好几页都在讨论这个问题,但这些解决方案都不适合我 Good tool to visualize database schemaeasy visualisation using sqlfairySchemaDisplay .似乎问题出在 SQLite.JDBCDriver 上。这是关于 java and sqlite 的讨论但我想不通。我所做的是将 sqlite-jdbc-3.7.2.jar 重命名为 sqlite.jar 希望能有所帮助,但正如您所见,运气不佳。

[pista@HP-PC schemaspy]$ ls -l
total 7084
drwxrwxr-x 3 pista pista 4096 Dec 12 22:34 javasqlite
drwxrwxr-x 2 pista pista 4096 Dec 12 22:05 lib
drwxrwxr-x 14 pista pista 4096 Dec 12 22:15 mendeley
drwxrwxr-x 2 pista pista 4096 Dec 12 22:13 out
drwxrwxr-x 2 pista pista 4096 Dec 12 22:05 properties
-rw-rw-r-- 1 pista pista 2655 Feb 22 2009 README.TXT
-rw-rw-r-- 1 pista pista 248945 Aug 16 2010 schemaSpy_5.0.0.jar
-rw-rw-r-- 1 pista pista 161441 Dec 12 22:04 schemaSpyGUI20090302.zip
-rw-rw-r-- 1 pista pista 26 Nov 4 2007 schemaSpyGUI.bat
-rw-rw-r-- 1 pista pista 102299 Mar 2 2009 schemaSpyGUI.jar
-rw-rw-r-- 1 pista pista 86 Nov 18 2007 schemaSpyGUI.sh
-rw-rw-r-- 1 pista pista 284954 Dec 12 22:25 sqlite-dll-win32-x86-3070701.zip
-rw-rw-r-- 1 pista pista 3201128 Dec 12 22:28 sqlite.jar
-rw-rw-r-- 1 pista pista 3201128 Aug 27 2010 sqlite-jdbc-3.7.2.jar
drwxrwxr-x 3 pista pista 4096 Dec 12 22:05 src
drwxrwxr-x 2 pista pista 4096 Dec 12 22:31 xerial
drwxrwxr-x 7 pista pista 4096 Dec 12 22:31 xerial-sqlite-jdbc-e0fd4e05a97e
[pista@HP-PC schemaspy]$ java -jar schemaSpy_5.0.0.jar -t sqlite -u pista -o out/ -db mendeley/wakatana@gmail.com@www.mendeley.com.sqlite
Using database properties:
[schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/sqlite.properties
java.lang.ClassNotFoundException: SQLite.JDBCDriver

Failed to load driver 'SQLite.JDBCDriver'from: [file:/home/pista/schemaspy/sqlite.jar]

Use the -dp option to specify the location of the database
drivers for your database (usually in a .jar or .zip/.Z).

我做错了什么,这是好方法吗?

最佳答案

我能够让 sqlite 与 schemaspy 命令行工具一起工作。我使用的 sqlite jdbc 驱动程序来自:

https://bitbucket.org/xerial/sqlite-jdbc

我的 sqlite.properties 文件如下所示:

description=SQLite
connectionSpec=jdbc:sqlite:<db>
db=database name
driver=org.sqlite.JDBC
#you may need to put the full path to the driver depending on your setup
driverPath=sqlite-jdbc-3.7.15-M1.jar
selectTablesSql=.tables

关于java - 可视化 sqlite 数据库模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13869792/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com