1. Driver overview
- GaussDB client access authentication, GaussDB supports the following three authentication methods:
- host-based authentication
- password authentication
- SSL encryption
2. JDBC interface introduction
1. Overview of JDBC
- Java Database Connectivity (JDBC) is a Java standard that provides
an interface (JAVA API) to connect to relational databases from Java.
The JDBC standard is defined and implemented through the standard java.sql interface . This enables each driver provider to implement and extend the standard with its own JDBC driver
. JDBC 4.0 is SQL 2003 compliant. - Supported JDK and JDBC versions: support JDBC4.0 functions and JDK8 and above versions
2. Basic operation of JDBC
3. JDBC load balancing configuration
4. JDBC log configuration
3. ODBC interface introduction
1. Overview of ODBC interface
(Open Database Connectivty, open database interconnection), the application programming interface used to access the database, mainly completes the middleware function between the application program and the database system.
2. Common ODBC interfaces and operations
4. Psycopy interface introduction
1. Overview of the Psycopy interface
thinking questions
- (Single-choice question) Which of the following is the interface used to establish a connection with the database and point to the SQL statement in JDBC? (C)
A. java.sql.ResultSet
B. java.sql.Driver
C. java.sql.Connection
D. javax.sql.DataSource - (Single-choice question) To use the Psycopg interface to execute a given SQL statement, to be able to extract the next row of the query result set and return a tuple, which of the following methods should be used? (C)
A. execute
B. executemany
C. fetchone
D. fetchall - (Multiple choice) In JDBC, what are the strategies for configuring load balancing? (ABD)
A. Polling
B. Priority
C. Active/Standby
D. Random