• subscribe
November 20, 2001 12:00 AM

Multilingual SQL Server

SQL Server Pro
InstantDoc ID #22997

One of SQL Server's weak points when critics compare it with DB2 and Oracle is its lack of programmability. Longtime SQL Server users might find this criticism strange. From the developer standpoint, SQL Server seems to be the most programmable database around. OLE DB providers and ODBC drivers let you easily connect to the database from virtually any language and from a multitude of clients, including non-Windows ones. Even from the DBA perspective, SQL Server appears eminently programmable. You can manage virtually every aspect of the database, from creation to tuning, through T-SQL. And whatever you can't do in T-SQL, you can accomplish by using SQL Distributed Management Objects (SQL-DMO).

Sounds simple, right? Therein lies the problem. While certainly a capable scripting language, T-SQL lacks many features—including object orientation, inheritance, and polymorphism—found in most modern programming languages. Thus, you can't use T-SQL to program every kind of solution.

That's the story today. But the Microsoft SQL Server team is on a mission to make SQL Server the world's number-one database. The team has already boosted the database's reliability, scalability, and functionality in SQL Server 7.0 and 2000. And the Microsoft developers have listened closely to the programmability criticisms leveled at SQL Server and are working to address those concerns in the next release of SQL Server, code-named Yukon. With Yukon's integrated Windows .NET Common Language Runtime (CLR) support, the SQL Server team is writing a new chapter in SQL Server's programmability story. Integrated support for the CLR will let DBAs and developers use any of the CLR languages—including Visual Basic.NET (VB.NET), C#, and Visual C++ (VC++)—to create database components that you can currently build only by using T-SQL. Although T-SQL will continue to be a high-profile database language, support for other languages will lay to rest any lingering SQL Server programmability concerns.

Increasing SQL Server programmability is a good thing, but it raises an interesting problem. Although more modern languages, such as VB.NET and C#, have features that make developing complex programs easier, these languages aren't based on SQL and don't have the same efficient, set-at-a-time orientation. T-SQL, in contrast, is a version of standard SQL, with a smattering of programming constructs to provide logic and flow control. This SQL foundation gives T-SQL a natural set-at-a-time orientation that, when used correctly, makes T-SQL solutions natural for DBAs to develop and efficient for relational database access.

How effectively Microsoft will bridge this language-performance gap remains to be seen. But throwing more capable and more complex—but less SQL-oriented—.NET languages into the mix increases the likelihood of performance potholes. To compete as a world-class enterprise database, SQL Server must support other languages. But to ensure that database applications written in these languages work as efficiently as possible, DBAs must be conversant in these languages. Parlez-vous C#?



ARTICLE TOOLS

Comments
  • Lawrence Louie
    11 years ago
    Dec 18, 2001

    One word: stability. One of the things that makes SQL perfect as programming language for databases is that they are type-safe and do not use pointers or other constructs that can get you into nasty trouble. It's a closed language that allows you to do what you MUST do and is not meant to address every coding problem. The big push for MSSQL has been the three "abilities": reliability, scalability and extensibility. By allowing for these language extensions, you may be taking steps backwards on the first two. It is bad enough with extended procs!

  • Yitzhak Khabinsky
    11 years ago
    Nov 28, 2001

    We can take a look at the issue from a different perspective. Historically, applications were developed as one-tier applications. That monolithic one tier was a database on a mainframe. That's why database vendors like Oracle and IBM heavily invested in programmability of their respected databases. Initially, the database language of choice was C; today, it is Java. And now all those nice features - object orientation, inheritance, and polymorphism – are just positive side-effects of the Java language.

    But modern applications are designed and developed as multi-tier applications, where each tier has a distinctive responsibility. In this scenario, databases speak native SQL. All that object-oriented stuff is located in application tiers above the data access/manipulation tier.

    I see some other trends, like substituting the OS’s file system for the database as in the infamous Internet File System (IFS), substituting the mail server on database server, and so on.

    On the other hand, SQL is 30 years old--a veteran language. And it needs modern improvements beyond the SQL-99 standard.

  • David L Finley
    11 years ago
    Nov 28, 2001

    It may be good "me too" marketing, but having the ability to write SQL code in procedural languages has potential pitfalls. You mentioned performance, by which I believe you mean query performance. I agree this is a problem. You are likely to see more use of procedural approaches (s.a. cursors) where set-based SQL would have been more efficient.

    But of even more concern here is what I would call "developer performance". By that, I mean how quickly a developer can develop the needed queries and maintain the queries. With their "favorite" procedural language available, many developers are likely to take more time developing procedural code that could have been developed much more quickly and maintained more easily if they took the time to learn and understand SQL.

You must log on before posting a comment.

Are you a new visitor? Register Here