Reflection in SQL Server 2008?

2019-07-10 17:17发布

I want to know, is there any reflection support in SQL Server 2008, like as c# support reflection. Basically I am curious about how SQL Server implements all our (where, orderby, exists) clauses. How it would implement all these in behind the scenes.

1条回答
ゆ 、 Hurt°
2楼-- · 2019-07-10 17:51

It's not that long ago when if you compared SQLServer to most object-oriented languages, that you would have been struck by the fact that SQLServer reveals a lot more about its inner workings than they do.

Its inherent to the concept of SQL and transactional databases, that a lot of the information about how they work is stored in the database itself. All tables are, for example, represented by rows in a table in a system database, as are all columns, stored procedures, and so on.

These days however, SQLServer does not go as far as C# in this regard, and you may be struck by the opposite conclusion.

An analogy could be drawn to the way that when you are browsing through reflected information on classes, you will hit "atoms" in the Democritian sense of something that can't be broken down any further. Either it'll be handled by the core IL instructions, or it'll be defined externally, and either way you can see any more "into" the implementation. SQLServer has more features that you can't peer into to see how they work than .NET

You might enjoy taking a look at PostgreSQL, which goes a bit further in how visible many of its functions are.

查看更多
登录 后发表回答