问题描述
我对了解如何使用SQL实际生成结果感兴趣.
我了解C ++代码如何转换为汇编代码.我了解汇编代码如何转换为机器代码.我了解CPU如何处理该机器代码,并具有一个指向机器代码的指针,并与寄存器一起使用来操纵代码.我了解算术逻辑单元等组件及其实际工作方式.我在使用IBM 360汇编器的汇编级编程中了解了这一点.我还学习了6502汇编语言.我了解通过使用工具和类似WinHook的功能进行链接和调试.我了解英特尔处理器的并行流水线.我什至了解解释性语言(例如原始的Basic和Java)和JVM,以及如何在运行时处理所有Java字节码.
我对非Von Neuman体系结构和基于依赖关系的理解不强,例如数据流处理器所使用的依赖关系.我知道有些语言(Prolog ??)具有表达式,您可以在其中定义变量之间的依赖关系,然后系统会根据该关系找到解决方案.例如,在Pro/E之类的CAD/CAD系统中,必须编写一系列必须保持的几何关系.当系统受到适当约束时,系统会生成符合约束条件的模型.
但是,现在在哪里可以很好地讨论这种情况在SQL中是如何发生的.我已经读过Hernadez的仅凡人的数据库简介",但真的不明白这种低级功能是如何实现的.
假设我们有一个名为mytable的表,其中有两列int x,int y;
I am interested in knowing how SQL is used to actually generate results.
I understand how C++ code gets translated to assembly code. I understand how assembly code gets translated into machine code. I understand how the CPU processes this machine code, has a pointer counter to the machine code and works with registers to manipulate the code. I understand components like Arithmetic Logic Units and how they actually work. I learned this in Assembly Level Programming using the IBM 360 assembler. I also learned the 6502 assembly language. I understand linking and debugging via a use of instrumentation and WinHook like functionality. I understand parellel pipelining for Intel processors. I even understand interpretive languages (like the original Basic and) Java and the JVM, and how all of the java byte code is processed at run time.
I have a weak understanding of non Von Neuman architectures and dependency based relationships like that used by that used for dataflow processors. I know that some languages (Prolog??) have expressions where you define the dependency relationships between variables and the system finds you solution based on that. For example, in CAD/CAD systems like Pro/E, one writes a series of geometic relationships which must be maintained. When the system is properly constrained, the system generates a model conforming to the constraints.
But now where was there a good discussion of how this happens for SQL. I have read Hernadez''s "An Introduction to Databases for Mere Mortals", but really don''t understand how this low level functionality is accomplished.
Suppose that we have a table called mytable, with two columns, int x, int y;
CREATE TABLE [dbo].[Transaction_Customer_Label](
[index] [int] NOT NULL,
[value] [nchar](8) NULL)
假设我们有一个类似
的语句
Suppose we have a statement like
SELECT * FROM tabel WHERE index=1
我有点理解,这必须解释为具有与col命名索引匹配的索引,并以某种方式将其与1.匹配.
在幕后,是否有一些代码可以将其基本上转换为某种类似的功能,例如在矩形网格中大量搜索值?
SQL语句的实际解析是如何真正完成的?
除非可以用简短的方式解释,否则我可能需要链接到文章,而不是简短的内容.
I sort of understand that this must be interpreted to something having indicies which matches the col named index with some way of cheching it against 1.
Behind the scenes, is there some code which basically converts this into something like a big search for values in a rectangular grid?
How is the actual parsing of the SQL statement really accomplished?
I probably need links to articles rather than short blurbs, unless this can be explained in something short.
推荐答案
这篇关于SQL内部解析的讨论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!