SQL 查询生成器 UI 的更好设计

发布于 2024-08-23 07:07:56 字数 442 浏览 6 评论 0原文

我正在为我使用的应用程序重新设计 SQL 查询生成器 UI,它是第三方应用程序,但有一个插件模型,因此我编写自己的应用程序来替换标准应用程序。在应用程序设计方面,我不太擅长的一个领域是用户界面。

我真的很想看看/听到其他人如何布局这个对话框,使其变得更好一点,或者你认为它本身就很好。

我在新设计中使用 WPF,因此可以非常灵活地使用 UI。

这是当前的 SQL UI: 替代文本 http://img190.imageshack.us/img190/9492/sqlq.jpg< /a>

只是为了清楚起见,当您从“表”菜单中选择一个选项时,它会将表名称添加到“来自表”文本框中,与将“列”下拉到“选择列”框中相同。

I'm in the process of redesigning a SQL query builder UI for a application that I use, well it's a third party app but has a plugin model so I writing my own to replace the standard one. One area I am not very good at when it comes to application design is the UI.

I would be really interested to see/hear how other people would layout this dialog, to make it a little bit better, or do you think that it is good as it is.

I am using WPF for my new design so I can be pretty flexible with the UI.

This is the current SQL UI:
alt text http://img190.imageshack.us/img190/9492/sqlq.jpg

Just for clarity when you select a option from the Tables menu, it adds the table name to the "from Tables" text box, same with the Columns drop down into "Select Columns" box.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

地狱即天堂 2024-08-30 07:07:56

到底谁会使用这样的 UI?因为它基本上只是一个预定义的 SELECT 语句模板,所以我希望知道如何从头开始编写 SQL 语句的人使用这样的工具(因为这本质上就是他们正在做的事情)。我想,添加可用的列和表以及类似的东西很好。

如果该工具旨在由经验丰富的 SQL 用户使用,那么该工具看起来限制太多。例如,似乎必须将自己的 JOIN 子句编写为 WHERE 子句,这使得外连接变得很麻烦。它比打开的文本框有用得多。

如果该工具是供没有经验的用户使用的,他们可能不知道关系数据库管理系统的来龙去脉,那么这个东西就太糟糕了。尽管工具有限制,但仍然需要做太多的事情。需要太多的 SQL 知识才能理解表单的需求。它比打开的文本框有用,但不多。

改进工具的方法取决于最终用户。如果他们对 SQL 有经验,该工具应该更像是一个开放的文本框,他们可以在其中编写任何他们想要的内容,包括 JOIN。看看 Microsoft 的 Server Management Studio 如何允许用户构建查询:非常不受限制,能够查看表并通过将一列拖到另一列来连接它们。这是一种以可见、有组织的方式处理查询的非常自然的方式。

如果用户没有 SQL 经验,该工具应该为他们做更多的事情。例如,如果用户选择两个表,它应该自动连接它们,这样他就不必了解连接是如何工作的。此外,侧面的组合框应该能够在任何打开的文本框中工作,而不仅仅是每个特定的文本框。因为您需要 SELECT 部分和 WHERE 部分中的列名称。

只需考虑您的用户群,并为他们量身定制工具即可。

Who exactly would use such a UI? Since it's basically just a pre-defined SELECT statement template, I would expect such a tool to be used by people who know how to write SQL statements from scratch (since that's essentially what they're doing). The addition of available columns and tables and stuff like that is nice, I guess.

If the tool is meant to be used by experienced SQL users, the tool looks much too restrictive. For example, it appears that one would have to write his own JOIN clauses as WHERE clauses, making outer joins bothersome. It's much less useful than an open textbox.

If the tool is meant to be used by inexperienced users who might not know the ins and outs of relational database management systems, this thing is laughably awful. Too much needs to be done in spite of the restrictiveness of the tool. Too much knowledge of SQL is needed to understand what the form needs. It's more useful than an open textbox, but not much.

Ways to improve the tool depend on the end users. If they're experienced with SQL, the tool should be more of an open textbox where they can write whatever they want, including JOINs. Look at how Microsoft's Server Management Studio allows users to build queries: very nonrestrictive, with the ability to view tables and join them by dragging one column to another. That's a very natural way to approach queries in a visible, organized manner.

If the users aren't experienced with SQL, the tool should do a lot more for them. For example, if the user picks two tables, it should automatically join them so that he doesn't have to understand how joins work. Also, the comboboxes on the side should be able to work in any of the open text boxes, not just one specific text box each. Because you need column names in the SELECT part as well as the WHERE part.

Just think about your userbase, and tailor to the tool to them.

山色无中 2024-08-30 07:07:56

如果您知道如何编写 SQL,那就非常有意义了。

我会考虑将表-列等下拉列表移动到更靠近其内容显示位置的位置。您甚至可以将它们与文本框的左侧标题合并。因此,例如,当您的文本显示“选择列”时,您可以将“列”下拉列表放在该位置。那么默认选择可能是。

不过,我认为这是一个不错的用户界面。

Makes perfect sense if you know how to write SQL.

I would consider perhaps moving the Tables-Columns-etc dropdownlists closer to where their contents will be displayed. You could even incorporate them with the left captions for the textboxes. So, for example, where your text says "Select Columns", you could put the Columns dropdownlist in that spot. Then the default selection there could be .

I think it's a nice UI, though.

拍不死你 2024-08-30 07:07:56

那么加入呢?

尝试重新设计它的意义何在?查询分析器拥有最好的用户界面之一,因为它不显眼,可以让您做您需要的事情。

我认为,如果您尝试将语句硬塞到某种格式中,这并不总是有效,但在大多数情况下可能有效。

这实际上取决于业务需求。

What about joins?

What is the point of trying to redesign it? Query analyser has one of the best UIs in that it is unobtrusive and lets you do what you need.

I think if you try and shoehorn statements into a format this will not always work but may work in the majority of cases.

It depends on the business requirements really.

仅冇旳回忆 2024-08-30 07:07:56

更好的 UI 是在带有复选框的树视图中显示所有表、字段。捕获点击事件,可以轻松聚合 SQL。

A better UI would be to show all the tables, fields in a tree view with check boxes. Trapping the click-event, one can easily aggregate the SQL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文