sqlitebrowser / sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at:
https://sqlitebrowser.org
Other
21.19k stars 2.14k forks source link

[Feature]: Create SQL Query by using ERD (entity Relationship) Diagram Interface #3750

Open riazahmedsg opened 3 weeks ago

riazahmedsg commented 3 weeks ago

Describe the new feature

I want to create a SQL query by dragging and dropping database tables onto SQL query interface. This should create a SQL query that I should be able to execute.

It will really make DB Browser for SQLite lot more useful as a tool

Does this feature exist in another product or project? Please provide a link

Yes, this feature is implemented by an app "Valentina Studio" for mac os. It is available on Apple App Store.

Do you have a screenshot? Please add screenshots to help explain your idea.

Screenshot:

image
mgrojo commented 1 week ago

We cannot currently do that, but for simple queries (SELECT from a single table), you can select the columns from the DB Schema dock, drag them and drop them in the SQL editor in order to get the corresponding query. Note that this only supports selection of columns, not JOIN or UNION queries with more than one table.

You have to check the "Drag & Drop SELECT Query" from the contextual menu of the DB Schema dock (right panel, by default).