Question: Repeat Exercise 5.13 using ODBC, defining void printable(char *r) as a function instead of a method. Exercise 5.13 Suppose you were asked to define a

Repeat Exercise 5.13 using ODBC, defining void printable(char *r) as a function instead of a method.


Exercise 5.13 

Suppose you were asked to define a class MetaDisplay 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 printTable(String r) using the JDBC API.

Step by Step Solution

3.40 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a I need to know the table names in r to know which column headings to use the names of the att... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Database System Concepts Questions!