Menu

#115 can't use SQLite on linux

open
5
2010-09-20
2010-09-20
t.n.a.
No

I use schema spy 5.0.0, ubuntu 10.4 and sqlite 2.8.17.
There seems to be a number of sqlite jdbc drivers available, but only this one (http://www.ch-werner.de/javasqlite/overview-summary.html) seems to have the SQLite.JDBCDriver class that schema spy seems to want to use. The problem with the driver is that it doesn't have binary packages for linux and it isn't able to find my installation of sqlite so I can't build it from source without a significant hassle.
Can other SQLite JDBC drivers be used, e.g. this one (http://www.zentus.com/sqlitejdbc/)? In the meantime, it would be useful to see right there in the documentation that SQLite use under linux may require building the driver from source with which there are "known problems".

Discussion

  • John Currier

    John Currier - 2010-09-22

    If you find a functioning driver that works under your flavor of Linux then it should be simple to pull the sqlite.properties file from the jar and modify it to conform to the characteristics of that driver. Normally you'd just have to change the driver and connect spec. Then point to your modified file with -t (it looks for it as a filename before looking inside the jar as a resource).

    Let me know if you need help,
    John

     
  • t.n.a.

    t.n.a. - 2010-09-22

    Hi John, I followed your advice and added an sqlite.properties file. This was an improvement, but the JDBC driver I'm using, while capable of performing most of the tasks I need it to perform, fails when used with SchemaSpy:

    Gathering schema details...Unable to extract index info for table 'TEST_TABLE' in schema 'null': java.sql.SQLException: not yet implemented
    .Unable to extract index info for table 'TEST_TABLE2' in schema 'null': java.sql.SQLException: not yet implemented

    ...

    ...java.sql.SQLException: not yet implemented
    at org.sqlite.MetaData.getImportedKeys(MetaData.java:503)
    at net.sourceforge.schemaspy.model.Table.connectForeignKeys(Table.java:54)
    at net.sourceforge.schemaspy.model.Database.connectTables(Database.java:644)
    at net.sourceforge.schemaspy.model.Database.<init>(Database.java:50)
    at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:164)
    at net.sourceforge.schemaspy.Main.main(Main.java:21)

    I was hoping to find a switch to use with SchemaSpy to not try to extract index info for the table, but there seems to be no such switch. Do you think it would make sense to add a feature like that to SchemaSpy, send a request upstream or both?

    Thanks, Tomislav

     
  • John Currier

    John Currier - 2010-09-24

    You can most likely use SchemaSpy without being able to extract index information, but it's mostly pointless if you can't get the imported keys. Those are the relationships and are somewhat fundamental.

    John

     
  • t.n.a.

    t.n.a. - 2010-09-24

    So, does that mean that "index information" and "key information" are one and the same? Is metadata about primary and foreign keys held only in the indexes?

     
  • John Currier

    John Currier - 2010-09-26

    My concern was that org.sqlite.MetaData.getImportedKeys() threw an exception saying that it wasn't implemented. That's what SchemaSpy uses to get the relationships.

    John

     

Log in to post a comment.