I'm dealing with a legacy project by which database management was handled on the internet utilizing an ODBC connection. The legacy program has lately been rewritten in C#. We're presently talking about how you can enhance the program and i'm a little uncomfortable with using ODBC for connecting towards the database. I've written programs for connecting to some server using electrical sockets and Publish, PUT, and obtain instructions coupled with cgi or php scripts and also have read extensively concerning the AJAX paradigm that we see because the answer. My friend demands on using ODBC. Do you know the benefits and drawbacks of utilizing an ODBC connection versus. a far more modern approach?

Database-to-application methods were never designed for use on the internet. Too chatty and hard to secure. If you possess the chance to do this, then you should look at encapsulating the database behind a correctly-guaranteed web service.

What about using ODBC having a modern approach, web services. You will find several benefits for this approach. For instance:

  • Multiple client programs may use just one demonstration of the net plan to access data. There's you don't need to write database related code in every individual application.
    • Customers have to install ODBC motorists and configure ODBC data sources only around the server machine that hosts the net service. Client programs could be running on other machines within the network.
    • Client programs aren't restricted to .Internet or Home windows platform. All they need to do to gain access to database is call an internet service.
    • Database connections could be shared among different client programs.
    • Use of databases could be controlled and supervised from the convenient location (the net service).

Obviously, you will find some security issues and restrictions towards the complexity of the queries.

individuals that do not know networking are condemned to reinvent it on port 80

there is nothing 'modern' about HTTP over ODBC. be sure that you wrap it in SSL and/or perhaps a VPN and employ sensible access controls.

it will likely be much more efficient than HTTP, which wasn't created for this. at the minimum, HTTP instructions add lots of overhead for every operation. ODBC will enable you to get much better latency (that is critical in client-driven DB designs)

I'd such like during my office. They'd plenty of machines with VB.Internet applications striking the neighborhood database (regularly first got it tied to a lot of unused connections) plus some web services that approached an exterior database with an SSH/SSL tunnel.

We did not genuinely have lots of issues with the exterior database unless of course the tunnel went lower that was rare. You are able to most likely also setup a VPN.

If you are looking at using AJAX/JSON/Relaxation technologies to talk with a database, you should use an abstraction layer like DBSlayer.

Utilizing a TypeIV "direct" database driver such as the System.Data.SqlClient namespace for C# ,or perhaps a JDBC driver for Java, is 2-3 occasions more effective (better performance) than studying the ODBC layer.

I'd avoid ODBC because its reduced and i believe it is not any simpler.