In Java choose a GUI component and either a DML or data retrieval statement, and give a code example of how these would work together. Solution A data manipulation language ( DML ) is a family of syntax elements similar to a computer programming language used for selecting, inserting, deleting and updating data in a database. Performing read-only queries of data is sometimes also considered a component of DML . The DML (Data Manipulation Language) statements INSERT, UPDATE and DELETE are used to insert, update or delete data on the database respectively. The DML operations of INSERT and UPDATE—that is, the write operations—are done by means of the prepareStatement() method of the Connection object created above. A call to this method takes variable bind parameters as input parameters and creates an object instance of thePreparedStatement class. The following line of code illustrates this: String sql = \"INSERT INTO emp VALUES (?,?,?,?,?,?,?,?)\";PreparedStatement dml_stmt = conn.prepareStatement(sql); The input parameters are bound to this object instance using the setXXX() methods on thePreparedStatement object. For each input bind parameter, a setXXX() method is called. Here XXXstands for Int, String, and so on. The following line of code illustrates this: Using Java Database Connectivity (JDBC) with Oracle INSERT, UPDATE, and DELETE Operations Using JDBC Prepared Statements The DML operations of INSERT and UPDATE—that is, the write operations—are done by means of the prepareStatement() method of the Connection object created above. A call to this method takes variable bind parameters as input parameters and creates an object instance of thePreparedStatement class. The following line of code illustrates this: String sql = \"INSERT INTO emp VALUES (?,?,?,?,?,?,?,?)\";PreparedStatement dml_stmt = conn.prepareStatement(sql); The input parameters are bound to this object instance using the setXXX() methods on thePreparedStatement object. For each input bind parameter, a setXXX() method is called. Here XXXstands for Int, String, and so on. The following line of code illustrates this: The differences between Statement object and PreparedStatement object are the following: A Statement object cannot accept bind parameters, whereas a PreparedStatement object can. A PreparedStatement precompiles the SQL and hence the precompiled SQL statement can be reused. In this way, it optimizes the database calls. UPDATE and DELETE operations are similar to the INSERT operation described above. However, if there are no bind parameters involved, a Statement object can be used instead of aPreparedStatement object with the values hard-coded directly in the DML statement. .