Built to order

Database ER Diagram Designer Desktop App with SQL DDL Export

This project builds a Database ER Diagram Designer Desktop App with SQL DDL Export using Electron that lets users draw entities, attributes and relationships with cardinality on an SVG canvas, validate the diagram, and generate CREATE TABLE DDL for MySQL and PostgreSQL. The preloaded college library schema shows keys, weak entities and junction tables working end to end. Suitable for B.E./B.Tech final-year projects in Computer Engineering and Information Technology.

Computer / IT JavaScriptElectronHTML · CSSSVG canvas renderingJSON project formatMySQL DDL generationPostgreSQL DDL generationSoftware
Database ER Diagram Designer Desktop App with SQL DDL Export — project thumbnail preview
More project photos (3)

The problem

Students usually draw ER diagrams on paper or a whiteboard during database design, then separately hand-write the CREATE TABLE statements for the same schema. The two artefacts drift apart quickly: an attribute added to the diagram is missed in the SQL, a many-to-many relationship is drawn but never resolved into a junction table, and a foreign key is typed with a different name or type from the primary key it references. Correcting that mismatch means redrawing, rechecking keys and rewriting DDL by hand. This desktop app keeps one source of truth. Entities, attributes, keys and relationships are modelled once on a canvas, a validation pass flags missing primary keys and unresolved relationships, and the DDL for MySQL or PostgreSQL is generated from that same model, so the diagram and the schema cannot silently diverge.

SYSTEM FLOW

5 components 4 connections

Live flow
Drag to explore
100%
appER diagram canvas

Entities, attributes and relationships with 1:1, 1:N and M:N cardinality are drawn on the SVG canvas.

Follow the working sequence

How it works

  1. The user creates entities on the canvas and adds attributes to each one, naming the entity for the thing it represents, such as Student, Book or Loan in the preloaded library example.
  2. Primary keys, foreign keys and data types are set per attribute, and weak entities are marked as weak with their partial key identified.
  3. Relationships are drawn between entities and each one is given a name and a cardinality — 1:1, 1:N or M:N — shown as labels on the connecting line.
  4. The validation pass runs over the model and flags missing primary keys, untyped attributes and any relationship that cannot be converted, so errors are fixed in the diagram rather than in SQL.
  5. During DDL generation, each entity becomes a table, foreign keys are placed on the many side of 1:N relationships, and every M:N relationship is resolved through a generated junction table with a composite key.
  6. The generated CREATE TABLE statements are previewed and exported for the selected dialect — MySQL or PostgreSQL — as a .sql file.
  7. The project is saved as a JSON file for later editing, and the finished diagram is exported as PNG or SVG for the project report.

Tech stack:

  • Electron
  • JavaScript
  • SVG canvas rendering
  • JSON project format
  • MySQL DDL generator
  • PostgreSQL DDL generator
  • HTML · CSS (desktop UI)
Parameter Value
Platform Desktop — Windows, macOS and Linux via Electron (design)
Preloaded example College library schema — 6 entities, 5 relationships
Diagram size Design target: up to approximately 40 entities per diagram
Relationship cardinality 1:1, 1:N and M:N, labelled on the canvas
DDL dialects MySQL and PostgreSQL only in the base build
Project format JSON (.json) — save and load
Diagram export PNG and SVG image formats
Internet requirement None — design, validation and DDL generation run offline
Installer size Approximately 90–130 MB via Electron packaging (expected)

Project features

  • [Drag-and-drop ER canvas] Entities are placed and moved on an SVG-rendered canvas as boxes listing their attributes, so the layout can be rearranged for a report figure without redrawing the whole diagram. (Implemented)
  • [Entities, attributes and key marking] Each entity holds named attributes with data types, and any attribute can be marked as a primary key or foreign key; weak entities are shown with a distinct double border and a partial key. (Implemented)
  • [Relationships with cardinality] Entities are connected by relationship lines labelled 1:1, 1:N or M:N, with the relationship name shown on the line, covering the cardinality notation taught in database courses. (Implemented)
  • [Validation pass] A single check scans the model and flags entities with no primary key, attributes with no type, and relationships that cannot be turned into tables, before any DDL is generated. (Implemented)
  • [MySQL and PostgreSQL DDL generation] The model is converted into CREATE TABLE statements in the chosen dialect, with primary keys, foreign keys and the dialect-specific auto-increment style, ready to save as a .sql file. (Implemented)
  • [Automatic M:N junction tables] A many-to-many relationship does not produce invalid DDL: the generator creates a junction table named from both entities, with a composite primary key and foreign keys to each side. (Implemented)
  • [JSON save / load and PNG / SVG export] The whole diagram is saved as a readable JSON project file that can be reopened and edited later, and the canvas can be exported as a PNG or SVG image for reports and presentations. (Implemented)
  • Optional / future scope: reverse-engineering an existing live database into a diagram, collaborative multi-user editing and additional dialects such as SQLite or SQL Server are NOT part of the base build — they are listed as optional or future scope.

What is included

  • Complete Electron source code (canvas, entity model, validation and DDL generator modules)
  • Installer / packaged build for desktop use
  • Sample college library-schema project file, preloaded and editable
  • Setup guide (install dependencies, open the sample project, generate and export DDL)
  • Project report PDF (background, ER modelling theory, methodology, module design)
  • PPT presentation for final review
  • Viva Q&A preparation document (primary and foreign keys, cardinality, normalisation link, junction tables)

Limitations & prerequisites

  • The app generates DDL only — it does not connect to, run or migrate a live database, and applying the exported .sql file is done in a separate database tool.
  • Dialect coverage is limited to MySQL and PostgreSQL in the base build; dialect-specific features such as stored procedures, triggers and views are not generated.
  • There is no collaborative editing — one user edits a JSON project file at a time, and merging two edited copies is manual.
  • Very large diagrams with many crossing relationships become unwieldy on a single canvas, even though the model itself still generates DDL.
  • Validation checks structural completeness such as missing primary keys; it does not judge whether the modelling choices themselves are good database design.
  • The tool works at design time only — it does not inspect data, suggest indexes from usage, or check an existing schema.

Frequently Asked Questions

Is this project suitable for a final-year project?

Yes — Computer Engineering and Information Technology students can use it to demonstrate desktop application development with Electron, data modelling, graph-style canvas rendering and code generation in one build. Turning an ER model into correct DDL, including junction tables for M:N relationships, gives concrete design decisions and algorithms to explain clearly in a viva.

Does the app create the database itself?

No. The app generates CREATE TABLE statements and saves them as a .sql file for MySQL or PostgreSQL. Running that file against a server is a separate step done with a normal database tool. Keeping generation separate from execution makes the output easy to inspect, edit and include in a report before anything is created.

How are many-to-many relationships handled?

An M:N relationship cannot be represented by a single foreign key, so the generator creates a junction table named from the two entities. That table holds both primary keys as a composite primary key and as foreign keys to each side, which is the standard relational mapping taught for M:N relationships.

What does the validation pass actually check?

It checks structure, not taste: entities without a primary key, attributes without a data type, duplicate attribute names inside one entity, and relationships left without a cardinality. Each problem is listed against the entity or relationship it belongs to, so the diagram can be corrected before DDL is generated from it.

Can an existing database be imported into a diagram?

Not in the base build. Reverse-engineering a live database into entities and relationships is listed as optional future scope, stated plainly rather than implied. The base workflow starts from a blank canvas or from the preloaded college library schema, which can be edited into a different schema.

Does the project need internet?

No. Drawing, validation, JSON save and load, PNG and SVG export, and MySQL and PostgreSQL DDL generation all run locally in the desktop app, so the full workflow works offline. Internet is needed only once, to download development dependencies while setting up or packaging the build.

Components & software requirements
  • Electron
  • JavaScript
  • SVG canvas rendering
  • JSON project format
  • MySQL DDL generator
  • PostgreSQL DDL generator
  • HTML · CSS (desktop UI)
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and email — the synopsis PDF downloads immediately. We may send occasional project updates; no spam, unsubscribe anytime.

Related guides

All guides

SQL vs NoSQL for Final-Year Projects: Which Database Should You Pick?

MySQL or MongoDB for your final-year project? SQL databases store data in related tables with enforced schemas, joins and transactions — the right default when your data is structured and money or records must stay consistent. NoSQL document stores trade the rigid schema for flexible, nested documents that ship faster when your data shape keeps changing. This guide compares them with a worked hospital-appointment example in both, a decision table, and rules matched to common project archetypes.

Read guide

Best 10 Desktop Utility Tool Projects

Ten desktop utility tool projects chosen from real, published projectech.in listings in Computer / IT — file renamers, screenshot annotation, clipboard history, screen-time tracking, duplicate finding, habit tracking, Markdown editing, PDF merging, and a Pomodoro timer — each with its real problem, how it works, and why students pick it.

Read guide

React vs Django vs Laravel: Picking the Right Stack for Your Final-Year Web Project

React, Django, or Laravel for your final-year web project? First, fix the category error: React is a frontend UI library that needs a backend, while Django and Laravel are full-stack backends. This guide compares the three on learning curve, project fit, hosting cost and job relevance, with a decision table, a code comparison of the same feature three ways, and rules for when a React SPA is overkill — so you commit to a stack with evidence, not hype.

Read guide
Get a quotation