20165327 2017-2018-2 "Java Programming" 7th Week study Summary

Source: Internet
Author: User
Tags mysql client

20165327 2017-2018-2 "Java program Design" 7th Week Study Summary teaching Contents Summary 11th chapter (i) MySQL database server
  • Download and install MySQL server
    • Start the MySQL database server
      • In the bin subdirectory, enter mysqld --initialize-insecure命令 and initialize the data directory.
      • Change Password:mysqladmin -u root -p password
  • Creating a table using the Navicat for MySQL client management tool mess
  • Download Jdbc-mysql Database Driver
  • Query operations
    • Sequential query: The ResultSet object can see only one data row at a time, using the next () method to move to the next data row
    • Control cursors: Where the value of type determines the scrolling method, the concurrency value determines whether the database can be updated with the result set
    • Conditional and Sequential queries
      • Where child statement select field from table name where condition
      • Sort records with an order by child statement
  • Update, add, and delete operations
    • Updating Update table SET field = new value where < conditional clauses >
    • Add INSERT into table (field list) values (corresponding specific records)
    • Remove delete from table name where < conditional clauses >
  • Using Preprocessing statements
    • Advantage: The SQL statement is interpreted as the internal command of the database, which reduces the burden of the database and improves the access speed.
    • Use wildcards instead of the value of a field, as long as you set the specific value represented by the wildcard before the preprocessor statement executes
  • General Query
    • The result set ResultSet object calls the GetMetaData () method to return a ResultSetMetaData object
    • The ResultSetMetaData object calls the getColumnCount () method to return the number of columns in the result set
    • The ResultSetMetaData object calls the getColumnName (int i) method to return the first name of column I in the result set
  • The processing of things means that the SQL statements in an application are either all executed or not executed, which is an important mechanism to ensure data integrity and consistency in the database.
    • Use setAutoCommit(booean b) the method to turn off autocommit mode, that is, to close the SQL statement immediately effective
    • The SQL statement in the transaction does not take effect immediately until the Connection object con calls the commit () method
    • You must call the rollback () method to undo the operation of the transaction when processing a transactional failure
(b) Code statistics

(iii) test error last week (iv) Progress of study
lines of code (new/cumulative) Blog Volume (Add/accumulate) Learning Time (new/cumulative) Important Growth
Goal 5000 rows 30 Articles 400 hours
First week 200/200 2/2 10/10
Second week 300/500 2/4 20/25
Third week 500/1000 3/7 15/40
Week Four 300/1300 2/9 20/60
Week Five 1150/2450 2/11 20/80
Week Six 900/3350 2/13 20/100
Seventh Week 400/3750 2/15 20/120
(v) Learning experience

I used to think the book was thick, and I didn't learn it very well. This week the teacher said the important contents of the book and the places we will use later, feel more direction. The next step is to have a good grasp of the basic tools, at any time to adjust the state.

20165327 2017-2018-2 "Java Programming" 7th Week study Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.