201621123037 Java programming 14th Week of study summary

Source: Internet
Author: User

Job 14-Database

tags (space delimited): Java

1. Study summary 1.1 This week summarize anomalies in the way you like (mind mapping or other).

2. Using database technology your system 2.1 briefly describes how to use the database to transform your system. What table do you want to build? The design of your watch. What are the key classes used in JDBC in the 2.2 system? 2.3 Key code for database related modules. Critical lines need to be annotated. 2.4 Select: Use Jdbcutil to retrofit the system. 2.5 Select: Use database connection Pool technical transformation system. 2.6 Optional: Use transaction Transformation System 3. Code Volume Statistics 3.1 Statistics the amount of code completed this week

The weekly code statistics need to be fused into a single table.

Option: 4. Database Learning Guide 1. MySQL Database basic operations

Create a database and insert your name and school number as a record. (, need to have their own school number, name)
Execute common SQL statements on your own established database (do it yourself, not necessary)

For:
The primary key is the ID, and the non-empty self grows

Reference: Experimental Task Book-topic 1

2. Use the statement operation database with the JDBC Connection database and Statement2.1. Complete the experimental Task book-topic 2. One of the public static void Displayall () and public static int insert (Student stu) is the key code that appears with its own school number. 2.2 If you want to finish querying student data based on the specified name, complete the function public Student findstubyname (String name), where is the SQL statement written? 2.3 What do you think is the routine of using JDBC to manipulate databases?

Reference: Experimental Task book-topic 2

3. PreparedStatement and parameterized Query 3.1 use PreparedStatement, write public Student findstubyname (String name) to find by name. (Paste the key code and run, need to appear in the operation of the number, comparison of 2.2, indicating the difference between the two implementations) 3.2 If you want to implement Fuzzy Lookup, how to modify? such as writing public List

Reference: Experimental Task book-topic 3

4. Batch update test

On the database course, you need to test the acceleration of the index for lookups. However, it is not possible to visually experience the acceleration of the index by operating on a hundreds of or thousands of data volume. Now you want to write a program that inserts 100,000 of data in bulk, and that the contents of some fields in that data can be randomly generated.

4.1 Your code (advent number), statistic run time (use JUINT4 test, need to appear time contrast). 4.2 Choose: How fast is the speed of the insertion calculated? (Calculated in Strips/sec or two MB/s). and test the disk read and write performance of the disks on your computer and compare them.
    1. Jdbcutil and DAO

5.1 Complete the test task-the 4th point in topic 5, that is, to write the Studentdao interface and its implementation class Studentdaojdbcimpl.
5.2 What are the benefits of accessing a database using DAO mode? Use the 4.1 code description to compare the traditional pattern with the code that accesses the database using DAO mode.
5.3 Using Jdbcutil to retrofit topic 3.1.

Reference: Experimental Task book-topic 5

    1. Transaction processing
6.1 Using code and running results to prove that you did implement the transactional functionality, and what do you need to be aware of when you encode transactions? Note: To compare the changes made to the database in both the successful and failed run scenarios. (Paste a piece of code that you think is more valuable.) 6.2 When do you think you need to use transaction processing?

Reference: Experimental Task book-topic 4
Reference: Transactiontest.java

Optional: 5. Extracurricular reading 5.1 JDBC (TM) Database Access5.2 code structure What Dao,service,controller,util,model mean, why divide 5.3 MYSQ database management Tools Navicat Basic use Method

201621123037 Java programming 14th Week of study summary

Related Article

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.