SQL Wizard

Planner

Plan a database in ideas, try it with sample rows, then build it for real.

Plan a database before it exists (Planner)

SQL Wizard accounts, Premium: DesignPlanner. Start a plan, add a block for each thing your app is about (users, jobs, partners, locations …) with + Block or a double-click on the canvas, and give it a note.

Drag the + on a block to another block and answer how they are connected: one, many of each other, or only one each way, and whether it is required. Put blocks in groups, write notes, zoom, Ctrl+Z / Ctrl+Y.

Plans are saved by themselves and shared with your organization; if someone else saved in between you choose whose version stays. Names are written the way a database writes them (Job Segmentsjob_segments).

A note with a list (countries, districts …) makes a block for each line. Right-click for a menu: on a block (rename, add a column, suggested columns, connect, new view, duplicate, group, dates, select what it connects to, delete), on a line (how they connect, required, other way round, remove), on a note, a view, several selected ones (group, dates, delete) or the empty canvas (add a block or note there, select everything, whole plan, SQL, Try it, Build).

Several at once: Shift+click (or Ctrl+click) adds or takes one away, a drag on the empty canvas selects an area (with Shift: adds to what is selected), Ctrl+A selects everything; drag one of them to move them all, give them a group or delete them together. Move the view with the Hand tool (H), by holding Space or with the middle mouse button; V goes back to Select, B adds a block, N a note, Ctrl + / − / 0 zoom, Ctrl+F shows the whole plan.

View and Rule open a dialog: choose the block (the selected one is chosen already), then what the view shows and its name, or what the rule does. The tools bar can be dragged to any side of the canvas.

Objects lists everything in the plan with a search, the minimap shows the whole plan (click it to go there); a double-click on a block, view, rule or note opens it to change it. Groups are in Objects: + makes one, a click opens it in Details (name, colour, its blocks).

New view and New rule are made in Details; the Tips window has the how-to and what may be missing.

Open in SQL Wizard

Start a plan

DesignPlannerNew plan (or, before the first plan, the three ways on the page): Start empty; From a list of words — type customers, orders, products (commas or one per line) and each becomes a block; From a template — Blog, Online shop, CRM and the other Database Wizard templates become blocks with their columns and links, ready to change.

Open in SQL Wizard

Columns in the Planner

Click a block: under Columns type a name (email, price, delivery_date …) and press Enter — what it holds and how long it is are guessed from the name, with the reason; click the column to change it (type, longest text, list values, required, only once, value of a new row) and drag the grip to put them in order. Suggested columns offers the ones usual for what the block is (jobs, contacts, countries, permissions …).

Every table gets id; created_at and updated_at (when a row was added and last changed) are a tick per block — left out by themselves for lists like countries, districts, post offices or permissions. Each line adds its link column (contact_id) or a table in between for "many of each other" — the line shows what it becomes.

Missing something? suggests blocks and lines a plan usually has; × hides one. Columns in the toolbar shows or hides them on the blocks, SQL shows the whole plan as a script to copy.

Open in SQL Wizard

Try a plan (Planner → Try it)

Try it builds the plan on the open database server with sample rows, so you can open the tables and see how it looks; the plan itself does not change. Choose a practice database of its own (try_job_planner — when your account may only create databases whose names begin a certain way, e.g. kruno_, the name begins like that) or, when you may not create databases, tables in a database you have, named try_jobs, try_contacts …, next to its own tables, which are not touched.

Set how many sample rows each table gets (0–50). The Planner notes what it built in a table try_info: the next Try it drops exactly those tables first (it asks once) and builds again, and Remove the last try drops them.

Tables starting with try_ that the Planner did not make are left alone.

Open in SQL Wizard

Build a plan for real (Planner → Build)

Build makes the plan real in a database and keeps it in step: choose a new database or one you have, then Compare. You see every change first, per table — new tables, added columns, created_at / updated_at, links, columns whose type, length, list or required differ, only once — and nothing is ever dropped: tables and columns that are not in the plan are kept and listed.

Where a change would damage rows, SQL Wizard counts them first (values longer than the new length, not numbers or dates, not in the list, empty in a required column, repeated in an only-once column, links to rows that do not exist) and chooses what damages nothing: the longest value now as the length, the missing values added to the list, optional, the link or the column left as it is — or you choose to change it anyway, and Build asks once more. Such a choice changes the plan too (a length, a list, optional), so the plan and the database stay in step.

After building it compares again and shows what is left. See the SQL before you build.

Open in SQL Wizard

Rules in the Planner (triggers, checks, functions, procedures)

A rule is something the database does by itself, or when you call it, made from a ready pattern instead of code: select a block and click Rule (or right-click the blockNew rule) and choose — Set a date by itself (a trigger: when status becomes done, done_at is set to now), Keep the history of changes (triggers that save the old values of every change and delete in a history block, which is added for you), Fill a code by itself (a new row gets a number like JOB-2026-0001), Refuse wrong data (a check: due_on at least ordered_on, price at least 0), Progress from its parts (a function: how many of its parts are done, in percent) or Close in one step (a procedure: CALL close_job(id) sets the job and its parts to done). The rule is an orange card next to the block with what it does in words; change its settings in the side panel, see its SQL.

Try it and Build make the rules; Build makes a changed one again (a rule holds no rows) and counts the rows a new check would refuse first. Scheduled events are left out — on shared hosting a cron job does that.

Open in SQL Wizard

Views and ready lists in the Planner

A view is a list to read, made from plain questions: select a block and click View in the toolbar (or New view in its panel; View with nothing selected explains how), and tick what each row shows — the block's columns, what it belongs to two steps along the lines (a job's contact and the contact's company) and counts (how many job parts each job has, how many partners). The joins come from the lines; SQL of the view shows them.

A view is a card on the canvas (dashed, with an eye) next to its block, with its columns and dotted lines to the blocks it reads from; move it, select it with others or delete it like a block. A block called countries, currencies or languages can be filled with a ready list (all 249 countries with calling codes, the main currencies and languages): tick Fill with the ready list.

Try it then puts the real entries in instead of made-up rows (and other tables link to them); Build adds the entries a table doesn't have yet, by code, and keeps the rows that are there. Views and ready lists are built by Try it and Build like the tables.

Open in SQL Wizard

Save a plan as a picture or as documentation (Planner)

PlannerExport: Picture (PNG) or Picture (SVG) saves the plan as it is drawn now, in the colours of your theme. Documentation… makes one HTML page: a title and an About text, the contents by group, the picture, the notes, every block with its columns and connections (linked to each other), the views, the rules and, if you tick it, the SQL script. Download HTML saves the file; Print / PDF opens it to print or to save as PDF.

Open in SQL Wizard

Didn’t find it?

In SQL Wizard, Report a problem reaches us directly — or write to us.