20165230 2017-2018-2 "Java program Design" 7th Week study Summary Textbook Learning contents Summary 11th Chapter JDBC and MySQL Database
- This week learned how to use the APIs and databases provided by the JDBC language in Java programs to interact with information
- Learned the MySQL database management system
Use Connection getConnection(java.lang.String)
the method to make the application connect to the database:DriverManager.getConnection(uri)
Problems in teaching materials learning and the solving process
- Question 1:jdbc-mysql which directory should the database-driven jar files be copied to?
Issue 1: Find out through online enquiry
Need to be copied to the JDK's extension directory (that is, the JDK specified by the JAVA_HOME environment variable)
- Question 2: What are the benefits of preprocessing statements?
Issue 2: Learn from the textbook to alleviate the burden of SQL statement interpreter inside the database
Problems in code debugging and the resolution process
Issue 1: Display is unsuccessful while debugging the running code of the connection database
- Solution: Found in the password password more knock a space, but actually set the time without setting the password, so display error, delete the space to display a successful connection
Issue 2: When debugging example11_1, the query was unsuccessful because the table name created is inconsistent with the book
Solution: Create a database named students in phpMyAdmin and use the " rs=sql.executeQuery("SELECT * FROM
students ");
" statement to successfully display
Code Hosting
Https://gitee.com/BESTI-IS-JAVA-2018/20165230/commit/5dd42538867b45b2b037b6d2039c2cf622fd26d9
Other (sentiment, thinking, etc., optional)
- This week, due to the task and experiment of pairing programming, we only learned to understand the Example11_1 code example, and the knowledge points behind the 11th chapter will be supplemented by learning in the later study.
Learning progress Bar
|
lines of code (new/cumulative) |
Blog Volume (Add/accumulate) |
Learning Time (new/cumulative) |
Important Growth |
Goal |
5000 rows |
30 Articles |
400 hours |
|
First week |
13/13 |
1/30 |
19/19 |
|
Second week |
426/426 |
3/30 |
12/12 |
|
Third week |
562/562 |
4/30 |
15/15 |
|
Week Four |
1552/1958 |
5/30 |
16/16 |
|
Week Five |
1123/3086 |
6/30 |
14/14 |
|
Resources
20165230 2017-2018-2 "Java Programming" 7th Week study Summary