A Python-based Entity-Relationship Diagram (ERD) builder that generates visual representations of database schemas using GraphViz.
An entity represents a real-world object or concept that can be distinctly identified. In database terms, it typically becomes a table. Examples include:
- Users
- Products
- Orders
Attributes are properties that describe an entity. For example, a User entity might have:
- id (primary key)
- username
- password
Relationships define how entities are connected to each other. Supported cardinalities include:
- One-to-One (1:1)
- One-to-Many (1:N)
- Many-to-One (N:1)
- Many-to-Many (M:N)
The project requires the following packages:
- Python 3.9.6 or higher
- graphviz: For generating the visual diagrams
- virtualenv: For managing the Python environment
Additionally, you need to install the GraphViz system package:
- On Ubuntu/Debian:
sudo apt-get install graphviz - On macOS:
brew install graphviz - On Windows: Download from the GraphViz website
The example code can be found in example.py.
MIT License
Copyright (c) 2021
