Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
.NET Feature — Database Toolkits: Portable and Cost-Effective Software
.NET Feature — Database Toolkits: Portable and Cost-Effective Software

We're living in an information age. Our daily life involves absorbing useful information and filtering out garbage. Information (data) plays an important role in our daily life. People, especially businesses, need to organize large amounts of disparate information. The information needs to be organized in such a way that you can easily access desired data quickly. The first step is to design a database, which balances normalization with data integrity and performance requirements. But that's just the first step. It's just as important to be able to programmatically access the data from the database in an intuitive and consistent way. That's where ODBC comes into play.

Why Use ODBC?
ODBC stands for Open Database Connectivity. It's a widely used API for database access. ODBC is based on the Call-Level Interface (CLI) specifications from X/Open and ISO/IEC for database APIs. It uses Structured Query Language (SQL) as its database access language.

ODBC is especially suitable for applications using several different databases. ODBC is popular because it's independent of any one database management system or operating system. It provides an interface that's portable to multiple platforms and relational database management systems. A single application can be connected to different databases with no changes, recompilation or re-linking required. At the same time, ODBC provides a powerful set of facilities for controlling and using databases.

Despite all the advantages of ODBC, using ODBC can still be a non-trivial task.

Disadvantages of ODBC
1.  Multiple installation of Driver Manager and driver
In a client/server environment a Driver Manager and a series of ODBC drivers are usually installed on a server. A Driver Manager and an ODBC driver have to be installed on each client as well. This allows each client to access any data maintained on the server, but leads to increased cost for hardware and maintenance. Figure 1 illustrates the situation.

2.  Overhead of setup and teardown of database
There are several basic steps for using ODBC:
• Connecting to a data source.
- Load the Driver Manager and allocate the environment handle
- Register the ODBC version
- Allocate the DBC handle. Also set any application connection attributes.
• Initialize the application
- Find out the capability of the driver through SQLGetInfo
• Prepare, build, and execute the query
- Allocate the statement handle and set the statement attribute
- Build and execute SQL statement
• Process the results
- Usually involves binding an application variable to a column in the result set and retrieves the result
• Disconnecting from the data source
- Free statement handle
- Free DBC handle
- Free environment handle

Here we illustrate the typical steps in programming with ODBC. For application developers to work on ODBC, they need to do a setup such as allocating handles (environment, dbc, statement), setting the desired attribute, performing the actual query, and cleaning up, which involves freeing the handles, disconnect, etc.

Finding Solutions
Elegant solutions exist for these problems. Here are some tips on finding them. Ideally, it shouldn't require an ODBC environment on the client machine. Second, it should be portable and simplify the process of database programming without sacrificing speed and performance.

One such solution, Recursion Software's Database Toolkit, consists of two components, client and server. The server makes use of the native operating system's ODBC environment to respond to the requests of various database clients. The client exposes APIs to database applications. Figure 2 demonstrates the architecture of this toolkit.

Benefits of Use
This solution is a cross-platform C++ solution for accessing a wide range of ODBC-compliant databases. Its purpose is to reduce development costs. It achieves this goal by reducing the need to have multiple ODBC drivers for different databases installed on the client machines. It also reduces software configuration complexity by configuring and maintaining your ODBC drivers in just one location. Figure 3 illustrates this scenario.

The toolkit contains classes and methods exposing simple APIs for building portable database applications quickly. It eases the burden of dealing with the following issues: connecting to the database, environment handling management, statement handling creation, executing and disconnecting from the database by putting highly repeated code in an easy-to-use API. There's no need for the application layer to do the basic set-up and clean-up routines.

Here are the steps for using this kind of solution:

  1. Library initialization
  2. Connect to the databases
  3. Execute the SQL statements
Listing 1 is a complete example that illustrates these steps: It illustrates one variant of the connection. A connection to the database server can also be built using another approach as shown in Listing 2.
About Bob DeAnna
Bob DeAnna joined Recursion Software in January 2006 and is responsible for directing product strategy and, most notably, leading the architecture and positioning of Voyager, the company’s intelligent pervasive distributed computing platform. Through his guidance the product has been enhanced to include native support for .NET, CF, Android, RETE-based rules engines, embedded databases, and the ability to run on nearly 20 embedded and mobile device platforms. Bob brings more than 24 years of experience in software architecture, development and mentoring. His expertise is in distributed application frameworks such as JEE, CORBA, .NET and ATMI. Bob holds a Bs in mechanical engineering from Rutgers University and a continuing education degree in C/C++ and Unix Programming from New York University.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Latest Cloud Developer Stories
As a result, it said, of “customer feedback and evolving usage patterns,” Microsoft cut the price of its cloud-ified SQL Azure database 48%–75% for databases larger than 1GB and introduced a new entry-level 100MB model. It blogged that it’s noticed that many projects start smal...
Wide and cheap availability of cloud-based media services is upon us. With the transformations these services are already bringing to the consumption of music, video and interactive media, change has likewise come to professional workflows. Documents in 2012 are read, written, co...
With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical ...
Fresh off a happy quarter, Rackspace said Thursday that it’s bought SharePoint911, one of those you-never-heard-of-them outfits that does SharePoint consulting, training and JumpStart services so it can deliver newfangled SharePoint services along with its existing SharePoint hos...
Cloud is a shift from the focus on underlying technology implementation to leveraging existing implementations and further building upon them. Cloud orchestration or a network of clouds is the wave of the future where these clouds can operate with elasticity, scalability, and eff...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE

Breaking Cloud Computing News

Mayor Jerry Sanders and San Diego City Councilmen Kevin Faulconer and Todd Gloria o...