sudo apt-get install sqlfairyNext, dump your database tables, e.g. for MySQL:
mysqldump -u username -p -d mydatabase > mydatabase.sqlFinally, for a PNG image of your schema:
sqlt-graph -f MySQL -o mydatabase.png -t png mydatabase.sqlIf your schema lacks explicit foreign keys, try the –natural-join options (man sqlt-graph, man sqlt-diagram)
Here's an example for a SQLite DB:
Get the schema dump:
echo ".schema" | sqlite3 ~/.liferea_1.4/liferea.db >> liferea.sqlGenerate a SVG diagram with:
sqlt-graph -c --natural-join --from=SQLite -t svg -o liferea_schema.svg liferea.sql
No comments:
Post a Comment