Java Database Jobs 15 weeks

Source: Internet
Author: User

1. Study summary 1.1 This week summarize multiple web-related content in the way you like (mind Mapping, OneNote, or others).
    • Java Database programming:
      1.JDBC-ODBC Bridging Technology
      2.JDBC Local Drive
      3.JDBC Network Driver (Common)
      4.JDBC Protocol Driver
    • The core classes and interfaces provided in the java.sql package are: (a class of four interfaces, which are just the opposite of one of the interfaces in the network section)
      | Classjava.sql.DriverManager
      | Interfacejava.sql.Connection
      | Interfacejava.sql.Statement
      | Interfacejava.sql.PreparedStatement
      | Interfacejava.sql.ResultSet
    • Statement interface function: (Increase and deletion check)
      | -Data Update operation: The executeUpdate() method is completed uniformly.
    • PreparedStatement Interface:
      | -Create PreparedStatement Interface object: public PreparedStatement(String sql) throws SQLException method
      | -Update Action: public int executeUpdate() throws SQLException method that returns the number of rows for the updated data
      | -Query operation: public ResultSet executeQuery() thorws SQLException returns the ResultSet object

      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.
    • The table to be created:

What are the key classes used in JDBC in the 2.2 system?
    • DriverManagerclasses, Connection Statement and classes in JDBC are used ResultSet .

      2.3 Key code for database related modules. Critical lines need to be annotated.

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.

Week Time Total code Amount New Code Volume total number of files number of new files
1 120 120 2 2
2 280 160 5 3
3 590 310 10 5
4 780 190 12 2
5 1290 510 17 5
6 1710 420 20 3
7 2513 803 24 4
8 2513 0 24 0
9 3014 501 27 3
10 3441 327 30 3
11 4121 680 37 7
12 4667 546 42 5
13 5214 547 48 6
14 5429 215 50 2
Option: 4. Database Learning Guide 4.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)

4.2. Use the statement operation database with the JDBC Connection database and Statement4.2.1. Complete the experimental Task book-topic 2. One of the public static void displayAll() with public static int insert(Student stu) theKey code and show your own number.
    • Public static void Displayall () method

    • public static int insert (Student stu) method

4.2.2 If you want to finish querying student data based on a given name, complete the function public Student findStuByName(String name), where is the SQL statement written?
    • String sql = " select *from student where name = ‘suwl‘ ";

      4.2.3 What do you think is the routine of using JDBC to manipulate databases?
    • Process for JDBC Operations database:
      | -Load the database driver software into the container.
      | -The database connection is obtained through the DriverManager class based on the specified database connection address, user name, and password.
      | -Use statement, PreparedStatement, resultset to implement CRUD operations on data.
      | -Frees up resource usage.

Java Database Jobs 15 weeks

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.