1, to the database, the table of each row of data record additions and deletions to change
Add: INSERT into Table name values ()
Delete: Delete table name where condition (id=? )
Change: Update table name set column name =? Where Condition (id=? )
Check: Select column name from table name where id=? Look up a piece of information
Select Column name from table name order by ID check all information
2. ResultSet result set
is an interface that points to a pointer to the current data row, starting at the first row of the column name, the. Next () method moves the pointer to the next line, points to each row of data, and each row of data is an object, so there is an object with one in it.
With while traversal, is a row of data a row of data traversal, and finally become an object, not a hodgepodge, porridge.
3, forget what is called JDBC, from where, what role?
JDBC is Java itself, in the java.sql package, written in the Java language
Role: Connect to the database
Java provides interfaces. Database vendor provides implementation class (driver)
4, PreparedStatement
has been precompiled and executed faster than statement
is an interface that inherits from the statement interface
When writing SQL statements, the parameter value is not directly written as value, but instead is replaced by a placeholder.
After you bind the parameter, setxxx ()
Then iterate over the result set and give the data to someone else so that you can return the complete object.
JDBC Operations Oracle Database--A small summary of the actual operation process