更新时间:2023-02-04 21:08:19
这是一个早期的模型,我对任何相关的评论感兴趣。***的工具这是一本教科书。这是软件不能为你做的那些领域之一。当然,它可以建立简单的选择&连接,但不是聚合函数或分组,或子选择等。为此,你必须学习做旧的方式 - 手/ wetware。我推荐:Lynn Beighley通过O'Reilly Press出版的Head First SQL。
练习,练习,练习。
I often find myself spending a lot of time figuring out why certain SUM()-aggregates sum up wrongly in SQL-queries. This problem often occurs if I do not take care when adding a JOIN, resulting in duplicate values being summed up etc. If I work with a big query with lots of JOINs, nested subqueries, GROUP BYs etc. things get very complicated to debug.
I would like to know if there exist a tool that will make it easier to construct and debug complicated queries, by graphically illustrating the data being summed up, joined together etc.
An example of what I'm looking for is illustrated in http://www.imada.sdu.dk/~sorenh07/misc/datacentric-querytool.png
It is of course just an early mockup, and I am interested in any comment related to this.
IMHO, the best "tool" for this is a textbook. This is one of those areas where the software can't do it for you. Sure, it can build simple selects & joins, but not aggregate functions or groupings, or sub-selects, etc. For that, you've got to learn to do it the old fashioned way -- by hand/wetware. I recommend: "Head First SQL" by Lynn Beighley, via O'Reilly Press.
Practice, practice, practice.