News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 7/1/2009 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
Is the mystery Borland suitor Serena?
Borland software is considering an offer from another company after a preliminary deal with MicroFocus. Is Serena the new company?
06/30/2009 01:55 PM EST

Windows 7 - An eBayer's dream product?
Windows 7 pre-orders can make people money on eBay.
06/29/2009 03:48 PM EST

Know thine cloud provider
Cloud computing require companies to understand compliance and regulation. Third parties will play a big role in regulated industries.
06/29/2009 02:58 PM EST

 

Microsoft Worldwide Partner Conf.
7/13/2009 to 7/16/2009
New Orleans
Microsoft

OSCON (Open Source Convention)
7/20/2009 to 7/24/2009
San Jose
O'Reilly Media

XBRL Technology Workshop & Summit
7/28/2009 to 7/30/2009
Santa Clara
XBRL US

ACM SIGGRAPH
8/3/2009 to 8/7/2009
New Orleans
ACM SIGGRAPH

OpenSource World (formerly LinuxWorld)
8/12/2009 to 8/13/2009
San Francisco
IDG World Expo


 
Most Read Latest News Blog Resources

SQL still serves




November 18, 2008 — 
It looked like an idea whose time had come: program the database using the developer’s primary language, sparing the programmer the pain of dealing with Structured Query Language.

But anecdotal evidence suggests that accessing the database directly from C#, Java and other modern languages is not a mainstream approach, and what was earlier seen as a breakthrough just isn’t a big deal to many developers.

“There is a lack of uptake, and I don’t think that will change,” said Duncan Mills, senior director of project management for the Oracle Fusion middleware group. There is “no overriding reason” to use Java instead of SQL to manipulate the database, he said.

“Ninety-nine percent of all database access continues to be via SQL,” said Steven Smith, president of ASPAlliance, a community of Microsoft developers. “In practice, I know of very few developers who are making extensive use of [.NET-enabled SQL Server].”

Microsoft embedded the .NET framework in SQL Server 2005, allowing developers to program its database from C#, VB.NET or other .NET languages. Oracle Database 8i, released in 1999, enabled developers to manipulate the database using Java for the first time. Actual data calls are still handled by PL/SQL (Oracle’s extension to SQL), noted Mills.

LINQing to data
One factor inhibiting a shift to database programming from C# or Java has been the emergence of newer technologies, such as Microsoft’s .NET Language-Integrated Query (LINQ) and frameworks based on Java Persistence API (JPA), sources said. Both approaches shield developers from working directly with SQL, but the JPA frameworks and LINQ offer a simpler way to handle data access for day-to-day business applications that don’t manage enormous volumes of data.

LINQ, which essentially puts a wrapper around SQL, is “a big thing,” said Bill Graziano, vice president of marketing for the Professional Association for SQL Server (PASS). Its emergence is a key reason why “we don’t see people replacing Transact-SQL stored procedures with [Common Language Runtime] stored procedures.”

Transact-SQL is the proprietary extension to SQL used by Microsoft and Sybase.

Earlier data access technologies such as ADO.NET (for the Microsoft school) and Java Database Connectivity were troublesome because developers had to dirty their hands with SQL. “You had to embed weird SQL strings in the code, and if you wrote a SQL query that wasn’t correct, the compiler couldn’t tell,” said Ganapathy Krishnamoorthy, Microsoft product unit manager for SQL Server. The problem wouldn’t show up until the code was executed, he said.

By contrast, the newer technologies “provide a level of abstraction,” said Stephen Brodsky, architect for Data Studio application development at IBM, referring to that company’s implementation of JPA.

Languages like C# and Java may handle database-intensive tasks more efficiently than SQL, but that’s moot for developers who prefer to move data to the middle tier. “.NET-enabled SQL Server is good for certain things. If you’re iterating over rows, it’s faster than SQL,” said Chris Kinsman, vice president of development for Vertafore, a provider of software for insurance companies. But for most of the applications Vertafore develops, there is little reason to do that in the database. “We prefer to do the heavy lifting in the middle tier,” he said.

José Blakeley, a partner architect for the SQL Server engine at Microsoft, argued that “for applications that process very high volumes of data—hundreds of terabytes to petabytes—moving data to the middle tier is unworkable.”

PASS’ Graziano agreed. “If you are doing things that are CPU-bound, the CLR [Common Language Runtime] is fast.”

For many tasks, said Graziano, SQL offers a more straightforward way of dealing with the database than is possible with a modern programming language: “A simple select statement to retrieve a customer name takes three or four lines of code. You give the ID, you get the name.” The same task in .NET requires a couple of extra lines. “You have to compile it into a DLL, copy it to SQL Server, register it. There is a lot of overhead to writing and deploying it [that way].”

Another factor in SQL’s favor is the abundance of skilled SQL programmers, said Vertafore’s Kinsman. “We have folks [on staff] who know Transact-SQL. We have continued to move forward with it. It makes sense for our brown-field apps,” he said, referring to older applications.

Meanwhile, many of SQL’s former limitations have gone away, said Oracle’s Mills. “PL/SQL used to be much slower than a compiled language like Java. But that’s not the case anymore.” He offered another example: Support for regular expressions, which indicate how the program should look for specified patterns, was once a good reason to choose Java for processing data, but now PL/SQL also supports regular expressions.

Guarding the fort
Cultural factors also stand in the way of developers’ using C# or Java to get at the database. Enterprise databases are managed by DBAs, noted Kinsman. “There’s a legion of them out there protecting the database environment, and they like [SQL]. They can inspect it, they can read it.”

And though Mills noted that safeguards are in place to prevent database corruption, he added that DBAs aren’t comfortable allowing programmers to drop their compiled code in the database.

Further, said Forrester Research principal Noel Yuhanna, manipulating the database from the developer’s programming language forces the developer to adopt a new mindset about how applications are written, and by nature such shifts are slow to occur. “Historically, we have built apps by tightly coupling them with the database. You needed to know what database you were using and then tightly integrate the two.”

But as applications increase in complexity, that model no longer holds up, added Yuhanna, who believes the practice of managing data from the developer’s programming language will take off. “What happens when the data an application needs resides in 22 separate repositories? Developers are more productive when they are not focusing on the underlying data source.”

That argues for programming the database from C# or Java, he said. “No one wants to throw away the apps they have already written, but developers will move to this approach for new, large-scale applications.” He estimated that 60% of large applications developed in .NET today are exploiting the CLR for data access. “We have seen a great deal of interest in it.”

But even with the new approach, said Graziano, there is SQL behind the scenes. “The application still executes a select statement. They all end up with SQL under the hood.

“It’s all SQL, one way or the other.”


Related Search Term(s): databasesJavaLINQSQLMicrosoft


Share this link: http://www.sdtimes.com/link/33057
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading