Section 15.10. Exercises


15.10. Exercises

1.

Write a program that connects to a database and, for each of the tables specified on the command line, prints out the table name and the number of rows in that table.

2.

Using what has been covered in this chapter, write a simple non-GUI SQL program, allowing the user to enter SQL statements, executing them, and showing the results (like a simplified SQL/Plus program). Can you provide some simple editing of the SQL? Or can you implement escaping to an external editor, for example, vi?

3.

Make it possible for the user of your SQL program to set and change the connection URLvia an environment variable, command-line parameter, or even from within the program. Your SQL program will then be able to query a variety of databases from various vendors.



    Java Application Development with Linux
    Java Application Development on Linux
    ISBN: 013143697X
    EAN: 2147483647
    Year: 2004
    Pages: 292

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net