I'm new to Java. I want to write a command line utility tool /program in Java for DB Transactions on Linux. It should work as follows.

When we run the program it should connect to the data base and should show prompt to enter the sql statement. What ever the sql statement user is entering it should log the details and the out put of that transactions too.. Waiting for your help.

Thanks in Advance.