Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate SQLite entity relationship diagram from database file

I am trying to reverse engineering to a database file that an android application generates. It gives me a SQLite file in .db extension. I tried pass it through SQLite Browser and it gets me the tables, but no relationships also every table givesme "id" for primary key. Any help or suggestions on how to approach this would be great, thanks!

like image 227
jvargas Avatar asked Sep 08 '25 06:09

jvargas


1 Answers

After extensive search, I found that you can do it without running a server using DBVisualizer. After you install DBVisualizer, import your database, then expand the database connection which is on the left under Connections, expand schema then double click Tables. Switch to References tab in the pane on the right and you'll have your diagram.

I have also found about SchemaCrawler which is free and open source unlike DBVisualizer and also doesn't require running a server, but have yet to get it to work. You can follow this guide if you wish to use this instead.

Example of ER diagram generated by DBVisualizer

like image 66
freshpasta Avatar answered Sep 10 '25 06:09

freshpasta