![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I'm contemplating writing an Sql parser, more so for my own personal education, and am wondering if anyone has had any experience that they can share with me on a question that I have. I have good experience with Sql, since I maintain and develop my companys Sql database engine. The product I maintain parses Sql and constructs a parse tree based on the elements of the Sql statement. Would building the tree using "Relational Algebra" elements be better instead? The Sql statement would be strictly Dml. Some advantages that I can think of: 1. Insulates the core logic of the query processor from the query language 2. Provides identical semantics to redundant elements of the query language |
#3
| |||
| |||
|
|
The latter advantage is particularly important for usability. Years ago, Fabian Pascal did a comparison of different SQL dbms's ability to provide good, consistent performance for logically equivalent queries using different redundant elements of SQL. If I recall correctly, the dbms that could achieve the fastest performance would also deliver the worst performance depending on how the user expressed the query. Ingres delivered the most consistent performance because, at the time, it supported SQL by translating it to QUEL. |
#4
| ||||
| ||||
|
|
"Bob Badour" <bbadour (AT) golden (DOT) net> wrote in message news:brnSa.1072$jp6.179816497 (AT) mantis (DOT) golden.net... [snip] The latter advantage is particularly important for usability. Years ago, Fabian Pascal did a comparison of different SQL dbms's ability to provide good, consistent performance for logically equivalent queries using different redundant elements of SQL. If I recall correctly, the dbms that could achieve the fastest performance would also deliver the worst performance depending on how the user expressed the query. Ingres delivered the most consistent performance because, at the time, it supported SQL by translating it to QUEL. I am never one to downplay Ingres' manifold virtues, but let me point out that the last statement above stopped being true more than a decade ago. |
|
Ingres only briefly translated SQL into QUEL. That was the approach taken in the later versions of Release 5, which came out in the late eighties. Since Release 6, and onwards, Ingres processes SQL directly (although QUEL is still fully supported). |
|
Ingres still does an excellent job of translating SQL queries into a canonical form that leads to the same (optimal) plan. |
|
Bob's statement is not entirely incorrect though. |
#5
| |||
| |||
|
|
Bob's statement is not entirely incorrect though. My statement was not incorrect in any way, shape or form. [snip] |
|
The point in my earlier post was not about Ingres but was an answer to a question regarding the advantages of translating SQL to a direct representation of the relational algebra. |
#6
| |||
| |||
|
|
The latter advantage is particularly important for usability. Years ago, Fabian Pascal did a comparison of different SQL dbms's ability to provide good, consistent performance for logically equivalent queries using different redundant elements of SQL. If I recall correctly, the dbms that could achieve the fastest performance would also deliver the worst performance depending on how the user expressed the query. Ingres delivered the most consistent performance because, at the time, it supported SQL by translating it to QUEL. |
#7
| |||
| |||
|
|
"Bob Badour" <bbadour (AT) golden (DOT) net> writes: The latter advantage is particularly important for usability. Years ago, Fabian Pascal did a comparison of different SQL dbms's ability to provide good, consistent performance for logically equivalent queries using different redundant elements of SQL. If I recall correctly, the dbms that could achieve the fastest performance would also deliver the worst performance depending on how the user expressed the query. Ingres delivered the most consistent performance because, at the time, it supported SQL by translating it to QUEL. The pros and cons of SQL vs. quel are strictly in terms of human factors of expressing queries. |
#8
| |||
| |||
|
|
The pros and cons of SQL vs. quel are strictly in terms of human factors of expressing queries. With all due respect, you are ignoring the fact that Quel is a less redundant language and how this impacts performance optimization. |
![]() |
| Thread Tools | |
| Display Modes | |
| |