Job 14-Database

Source: Internet
Author: User

1. Study summary 1.1 This week summarize your database-related content 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.

Set up UserInfo table record user information, establish commodityinformation record commodity information, establish SHOPPINGCAR record the product information that the user buys.

What are the key classes used in JDBC in the 2.2 system?

The statement is used to process the SQL statements in the connection. The DriverManager is used to load the driver and establish the connection. The resultset is used to process the result set. The connection is used to establish a connection to the database.

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.

Number of rows number of new rows Number of files number of new files
0 0 0 0
762 762 16 16
762 0 16 0
1295 533 23 7
1752 473 29 5
2061 309 34 5
2641 580 38 4
3059 398 41 3
3410 351 46 5
3845 435 50 4
4152 307 57 7
4641 489 63 6
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)

参考:实验任务书-题目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?
参考:实验任务书-题目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
参考:实验任务书-题目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. 5. Jdbcutil and DAO5.1 complete the test task-the 4th point in title 5, which 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.
参考:实验任务书-题目5
6. Transaction 6.1 Using code and running results proves that you did implement the transaction function and what do you need to be aware of when you encode the transaction? 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?
参考:实验任务书-题目4参考: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

Job 14-Database

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.