Java Reference
In-Depth Information
17-2. Example 17-1 is a general-purpose SQL interpreter program that displays
database query results in a rudimentary text-based table format. Modify the
program so that it outputs query results using HTML table syntax, resulting
in output suitable for display in a web browser. Test your program by issu-
ing queries against some existing database.
17-3. If you are familiar with CGI programming, modify Example 17-1 again so
that it can be used as a CGI script. Write an appropriate HTML frontend that
communicates the user's SQL queries to the Java program on the backend
and displays the HTML table output by your program.
17-4. Write a program to create a database table of all files and directories stored
on your computer (or at least all files and directories beneath a specified
directory). Each entry in the database table should include a filename, a size,
a modification date, and a boolean value that indicates whether it is a file or
a directory. Run this program to generate a database of files. Write a second
program that allows a user to make useful queries against this database,
such as “list all files larger than 1 megabyte that are older than 1 month,” or
“list all files with the extension .java that were modified today.” Optionally,
design and create a GUI that allows a user to issue this sort of complicated
query without knowing SQL.
Search WWH ::




Custom Search