is JDBC not a pure network connection database?
A: The network connection, the bridge is no longer used
Class.forName () is not specifically used to drive the load?
A: Specifically used to load classes
On which interface is the transaction control controlled?
Answer: Connection interface
Is the isolation of the transaction set in that interface?
Answer: Connection interface
What is the database connection pool optimized for?
Answer: Optimizations on database connection objects
The advantages and disadvantages between DBCP and c3p0 simply say?
A: C3p0 not so resource-intensive, dbcp to consume some resources, and c3p0 faster than DBCP
Does preventing SQL statement injection use that interface to execute SQL statements can prevent injection problems?
Answer: PreparedStatement interface
Can a stored procedure call return a recordset?
Answer: You can
I have a stored procedure getName () inside two parameters an int one takes out the parameter, ask me how to write the called string in Java
Answer: {call GetName (?,?)}
If I want to get the table structure of the query, can I get a table structure object in that object?
Answer: ResultSet object
Can I get the data backwards in the resultset?
A: Yes, you can use the ResultSet object to call the Afterlast method first, call the previous method before the value
Can we connect MySQL to Oracle or DB2 in one program?
A: Yes, you can control the connection object of the respective database.
How do I set the manual commit Transaction mode? The method? What parameters
Answer: Use the Connection object to call the Autocommit method to pass the false parameter
I have set up a manual commit transaction, and finally did not call commit or rollback will report an error?
Answer: No, the default is to connect to localhost
You've used a method that has had this effect before, and now it's not working? Why does such a thing happen?
A: Java only declares the interface, the implementation method is written by the various database companies, if the implementation method is modified, then the effect will naturally change
We modified the data state, but the other side of the transaction is not visible, because I do not have a transaction to commit, how can I let other things see the modified data not submitted?
A: Set the transaction isolation level of the database to: READ UNCOMMITTED (UNCOMMITTED)
What if I use a query to deploy his lock?
Answer: Add a for update at the end of the SELECT statement
What locks can be added multiple times in a single record?
Answer: Shared lock
Do I need to wait for the other person to release the lock when I modify the shared lock lock record?
Answer: No, you need to release the lock to modify
Whether an exclusive lock lock data can be locked by a shared lock
Answer: No, the exclusive lock is very strict and cannot be locked by another lock.
Lock table and lock line in MySQL, that consumes some resources?
A: The lock line consumes some resources
SQL batch can be executed on those interfaces?
Answer: statement and PreparedStatement interface
Execute SQL When do we choose statement or PreparedStatement?
A: When the SQL statement is written by the developer, make sure that SQL injection does not occur, you can use statement, if it is a user input through text, the use of SQL injection problems may occur preparedstatement
Could we use statement to execute DDL statements?
A: Yes, you can execute any SQL statement using the Execute method
MySQL database connection string If the database name is not filled in, will be error
Answer: No error, after the SQL statement written in this format can select * from Jdbc.student
Database connection pool, what method can be used to put connection back in the pool
Answer: The Close method
Does the connection pool have a shutdown method? Close Connection Pool
Answer: Yes, the same is the Close method
Can a connection query for SQL connect multiple tables?
Answer: You can
Connect query criteria use on later can I also use where?
Answer: You can
The amount of data in a table is very large, what can you do to optimize it?
A: Table partitioning, multiple table storage, setting primary key, index, using MyISAM engine
How to solve the large amount of data query method?
Answer: Use the Limit paging query
Why is it best to search by primary key?
Answer: Because the primary key has an optimized query, and the primary key is unique
Association relationship, is to let the database maintenance relationship, or our program maintenance, that way good?
A: Database maintenance, self-maintenance needs to open a lot of business, more trouble
Do we have a larger file to store in the database? Why is it suitable for storing large files?
Answer: Can be stored, but the database is not suitable for storing files, mainly for the following reasons:
1. Read/write to the database is never as fast as File system processing
2. Database backup has become huge and time-consuming
3. Access to files needs to traverse your application layer and database layer
35. We operate using a connection object what's wrong with it?
A: A connection object is not busy at all, and now the Web site concurrency is larger will lead to data chaos, asynchronous problem, now is the era of multithreading
36. Connect to the database, what is the driving load?
37. Is there any way to know what the AutoNumber ID is after you insert?
38.MySQL Improve query efficiency we use that engine.
This article is from the "zero" blog, make sure to keep this source http://zero01.blog.51cto.com/12831981/1977028