<prompt> Nina database na ninahitaji kupata katika Java. kuandika mfano wa code ya jinsi ya kufanya hivyo.Tabla jina: ORDER_TABLE, CUSTOMER_TABLE, COST_TABLE.  <response>: Sure, heres an example Java code snippet that demonstrates how to connect to a database and retrieve data from multiple tables:import java.sql.;public class DatabaseExample public static void mainString args tryConnection conn DriverManager.getConnectionjdbc:mysql:localhost:3306mydatabase, username, password String query SELECT FROM CUSTOMER_TABLE JOIN ORDER_TABLE ON CUSTOMER_TABLE.customer_id ORDER_TABLE.customer_id JOIN COST_TABLE ON ORDER_TABLE.order_id COST_TABLE.order_id; PreparedStatement preparedStatement conn.prepareStatementquery; ResultSet resultSet preparedStatement.executeQuery; while resultSet.next int orderId resultSet.getIntorder_id; String customerName resultSet.getStringcustomer_name; double cost resultSet.getDoublecost; System.out.printlnOrder ID: orderId , Customer Name: customerName , Cost: cost; catchSQLException ex ex.printStackTrace; In this example, we are connecting to a MySQL database on localhost and retrieving data from three tables CUSTOMER_TABLE, ORDER_TABLE, and COST_TABLE using a JOIN operation. We store the data in a ResultSet object and print it to the console. Note that you will need to replace mydatabase, username, and password with your specific database name, username, and password. 