Question: Suppose you were asked to define a class Meta Display in Java, containing a method static void printable(String r); the method takes a relation name
Suppose you were asked to define a class Meta Display in Java, containing a method static void printable(String r); the method takes a relation name r as input, executes the query “select * from r”, and prints the result out in tabular format, with the attribute names displayed in the header of the table.
a. What do you need to know about relation r to be able to print the result in the specified tabular format?
b. What JDBC methods(s) can get you the required information?
c. Write the method print Table(String r) using the JDBC API.
Step by Step Solution
3.39 Rating (161 Votes )
There are 3 Steps involved in it
a In order to print the result of a SQL query in a tabular format you need to know the number and na... View full answer
Get step-by-step solutions from verified subject matter experts
