Service: DrawDB - EyevinnOSC/community GitHub Wiki
DrawDB
DrawDB (serviceId drawdb-io-drawdb) is an open-source, browser-based database schema designer and SQL generator. Everything runs in the browser; no account or back-end connection is needed. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance. License: AGPL-3.0.
What it can do
- Draw entity-relationship diagrams: tables, columns, data types, default values, constraints and relationships.
- Export the schema as SQL
CREATE TABLEstatements for PostgreSQL, MySQL, SQLite, MariaDB and MSSQL. - Import existing
CREATE TABLEDDL and render it as a diagram. - Export the diagram as PNG or as a DrawDB JSON file to share a design.
Creating an instance
DrawDB has no dependencies on other OSC services. Create it with create-service-instance, serviceId: "drawdb-io-drawdb":
{ "name": "myschema" }
Wait for it to be running (wait-for-service-ready or get-instance-status) and get the URL with describe-service-instance.
Options
| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the instance. Letters, digits and underscore only (^\w+$), at most 20 characters. |
DrawDB has no other options.
Using the instance
Open the instance URL; no login is required. The left toolbar lets you add a table, a relationship (foreign-key link between fields), an area (labelled box grouping tables) and a note. Changes are saved automatically in your browser's local storage. Click Export and pick the SQL dialect to get DDL, or use Import, SQL to paste existing DDL.
With the OSC CLI:
osc create drawdb-io-drawdb myschema
Limitations
- Diagrams are saved in the browser's local storage, so they stay in that browser unless exported.