20165218 2017-2018-1 "Java Programming" 7th Week study summary textbook Learning content summary jdbc and MySQL database
- Database functions: Data storage, query, modification, security
- MySQL: Database; JDBC: API for manipulating databases
APIs (application Programming Interface, application programming interfaces) are pre-defined functions designed to provide the ability of applications and developers to access a set of routines based on a piece of software or hardware without having to access the source code. Or understand the details of the internal working mechanism.
- Sending SQL query statements to the database
try{ Statement sq1=con.createStatement();}catch(SQLException e){}
Working with query results
- Close link
con.close();
Once you close the link, you will not be able to view the data in the database immediately
- Update Add delete operation
Operation |
instruction |
Update |
update 表 set 字段 = 新值 where<条件子句> |
Add to |
insert into 表(字段列表) values (对应的具体记录) |
Add to |
insert into 表 (对应的具体记录) |
Delete |
delete from 表名 where<条件子句> |
Code Hosting
(run result of statistics.sh script)
Last week's summary of the wrong quiz
Interface |
features |
Set interface in the API collection |
Duplicate elements are not allowed, elements in countless order |
List |
Allow repeating elements, elements in order |
Cause of error: Only three books were written ...
Resources
The 7th Week of Java Programming Study summary 20165218 2017-2018-1