News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Using SQL to edit drawings

Started by Yacine, September 03, 2013, 07:37:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yacine

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.
Yacine

Zigoto

Quote from: Yacine on September 03, 2013, 07:37:38 PM

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


hello Yacine
not yet done  :D ?
Ziorg

Yacine

LOL. Did not get the necessary week yet.
Would you be interested?

Yacine

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 175 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1030KB.
Tokens: post-login.
Cache hits: 13: 0.00137s for 26,766 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]