4

Very new to sql and thus new to sqlite3. I'm setting up a relational database and need a visual for peer review prior to populating with actual data. (That is, I am setting up all the tables and fields, with primary and foreign keys, but there are no records for now.)

Is there a way to make a figure that visually shows the relationships between the tables? (Example internet grab below--or maybe linked because I am new user.) Using sqlite3 and python. Bonus points if it looks better than the crummy Access visual!

schema plot figure

a11
  • 3,122
  • 4
  • 27
  • 66

2 Answers2

2

one possible solution to making relational diagrams in Python is ERAlchemy. As of the time of this posting, I did not see any other pure Python solution.

https://pypi.org/project/ERAlchemy/

DaFi4
  • 1,364
  • 9
  • 21
  • do you know if there is a way to get ERAlchemy to also show the foreign keys? (looks like the PK fieldnames are underlined) – a11 Jan 29 '19 at 04:15
  • yes, use the ForeignKey decorator for Table.Column, such as ForeignKey ('foreigntablename.foreignfieldname'), for some example please see answer for https://stackoverflow.com/questions/44981986/sqlalchemy-er-diagram-in-python-3/46020917 – DaFi4 Jul 29 '20 at 10:35
0

Navicat has a product that you can use to import databases and display schemas. They have a trial version (see below). There's a stripped down version that you can use for free to depict schemas manually; the full license looks to be pretty pricey.

Navicat

Check it out here if you're using Mac - https://itunes.apple.com/us/app/navicat-ess-12-for-sqlite/id1257394364?mt=12

You can get their trial version from the Navicat website - https://navicat.com/products

AFK
  • 412
  • 6
  • 12