Author Topic: Using SQL to edit drawings  (Read 4307 times)

0 Members and 1 Guest are viewing this topic.

Yacine

  • Hero Member
  • *****
  • Posts: 2770
Using SQL to edit drawings
« on: September 03, 2013, 02:37:38 PM »
This morning on my way to work, I tought about a tool which might be very cool and easy to implement:
a SQL data editor.
Let's say you have in a docking window a memo field in which you type (or load) commands.
These commands would be plain SQL.
On clicking an execute button (or before), you'd export your drawing to a database (they are generally quite fast), modify the data of the drawing and re-import.
Even tree structures could be translated in parent-child structures of a relational DB.

As possible applications, you could do:
- SELECT * from shps WHERE prop.XYZ="ABC" --> and get those shapes selected
- UPDATE prop.Field1 set 1 WHERE ThisAndThat --> and set the field1 to whatever complexe value you want
- UPDATE shp.pinX set 230 WHERE shp.prop.tag = "Valve" --> even modify the arrangements of your shapes
- INSERT Connectors and link them to shapes
- Export to a table, edit however and re-import.
- Do Reports,.... Endless!

The main advantage being, that you won't need to develope an own language or syntax. You profit from the whole richness and stability of SQL.

The tool can probably be written in less than a week, as everything is already available.

On might even think about restricting the syntax by dialogs (eg specific selection dialogs, only modifications, etc...) to hide the technical background to normal users.

What do you think about it?

Cheers, Yacine.
« Last Edit: September 03, 2013, 02:40:17 PM by Yacine »
Yacine

Zigoto

  • Jr. Member
  • **
  • Posts: 16
Re: Using SQL to edit drawings
« Reply #1 on: January 17, 2014, 06:47:20 AM »

The tool can probably be written in less than a week, as everything is already available.


hello Yacine
not yet done  :D ?
Ziorg

Yacine

  • Hero Member
  • *****
  • Posts: 2770
Re: Using SQL to edit drawings
« Reply #2 on: January 18, 2014, 03:33:03 AM »
LOL. Did not get the necessary week yet.
Would you be interested?

Yacine