This Question is Assumed Answered

1 "correct" answer available (5 pts) 13 "helpful" answers available (3 pts)
4 Replies Last post: Jun 3, 2008 7:15 PM by promiseliu

Can Curl be used in OLTP?

Jun 2, 2008 9:02 PM

Click to view promiseliu's profile Level 1 promiseliu 11 posts since
May 25, 2008

Hi, my dear experts

After several day's study of Curl, I'm doubt if Curl is only used in data analysis and rendering?

Can it be used in online transaction? If it can, how and where can I execute my DML?


thanks!

Click to view wbardwell's profile Curl wbardwell 75 posts since
Oct 31, 2007
1. Re: Can Curl be used in OLTP? Jun 2, 2008 9:21 PM

The Curl language is for the client side, so it would be sending SQL or SOAP requests or whatever to the server that would have a database system of some sort. How it would send that would depend on what your server supports. It could use the WSDK to send SOAP requests, or the normal HTTP APIs to send requests to any sort of server using a web server interface. There are included classes and server components to do some basic stuff with a web server hosting Java and using JDBC to talk to a database (ConnectedRecordSet and the CDBC APIs) Or it could use sockets if the server used some custom network protocol.
Click to view promiseliu's profile Level 1 promiseliu 11 posts since
May 25, 2008
2. Re: Can Curl be used in OLTP? Jun 2, 2008 10:12 PM
in response to: wbardwell

Thanks anyway!

But it seemed that the ConnectedRecordSet class and the CDBC APIs are only used to retrieve data.Is it true?

Can you give a detailed explanation as to how Curl can talk to a web server hosting Java and using JDBC to talk to a database? The chapter "Using Record Sets with a Database" is too simple to be helpful in a real-world development.

Click to view tdeng's profile Level 3 tdeng 35 posts since
Oct 17, 2007
3. Re: Can Curl be used in OLTP? Jun 3, 2008 7:06 PM
in response to: promiseliu
A curl applet tipically talks to a database with the folloing flow:

Curl Applet <--1-> Sever side application (ie: java sevlet) <--2-> Database (like oracle)

When and how a sevlet talks to databases(step 2 above) has nothing to do with a Curl applet, what Curl applet needs to know is just the interface to access web services provided by application servers like Apache/Tomcat. So, for Curl applications to communicate with a server, what all you need to do is to define an interface for retrieving/sending data from/to the web service, in step 1 above.

RecordSet is a good data model used to manipulate data from server on the clientside for Curl applets, but you need not always use RecordSet to hold data, you could define your own data class for using in your application ofcourse.

As I stated above, whether a java application on server side will talk to a database is completely upon to how you provide/implement the web service, and nothing between the java application and database will affect your Curl applet .

I strongly recommend you read the Curl Document shipped with the free Curl IDE, especially for the follwing sections(Under Curl Developer's Guide ):

  • Interaction with External Resources
    • Interacting with Web Sites
      • Creating Web Forms
      • The SOAP Interface (WSDK, the better)
      • AAccessing Files and Other Resources
        • synchronous Stream IO (for synchronous reading of data streams)
Click to view promiseliu's profile Level 1 promiseliu 11 posts since
May 25, 2008
4. Re: Can Curl be used in OLTP? Jun 3, 2008 7:15 PM
in response to: tdeng

Thank you very much!