当前位置:网站首页>[JDBC] classic interview questions of JDBC, constantly updating
[JDBC] classic interview questions of JDBC, constantly updating
2022-07-24 08:16:00 【Sivan_ Xin】
What is? JDBC?
JDBC The full name is Java DataBase Connection.
That is to say Java Get database connection , By using JDBC Related interfaces and classes . We can use it to connect to the database , perform SQL Statements, etc. .
What is? JDBC Connect ? How to get the database /JDBC Connect ?
JDBC A connection is a session established between the host and the database server .
obtain JDBC Linking is mainly divided into two steps :
1. Register and load the driver . call Class.forName() Method . The driver class will be registered to DriverManager Class , And load it into memory .
2. call DriverManager Class getConnection Method . Incoming database connection url, user name , password , You can get the connection object .
JDBC How to achieve Java Procedure and JDBC Driven loosely coupled ?
There is only one case , Will be involved JDBC drive , Is the use Class.forName Reflection mechanism to register and load drivers .
All other operations are Java Program call JDBC Interface to complete . In this way Applications and The driver Isolation , If you want to change the database, it becomes simple .
JDBC Steps to connect to the database ? Operate on data ?
- Register and load the driver .
- Use DriverManager Get the connection .
- precompile sql sentence , return PreparedStatement.
- Fill in placeholders .
- Perform database operations .
- Processing result set ResultSet.
- close resource .
边栏推荐
- Hegong sky team vision training day4 - traditional vision, contour recognition
- *Code understanding *numpy basic (plus code) that must be understood
- Svg from entry to regret, why not learn it earlier (graphic version)
- Natural language processing Jieba
- Autojs article proficient in detailed explanation of autojs script tutorial
- Why is knowledge base important? This is the best answer I've ever heard
- Avoid pitfalls and stay away from PUA in the workplace. You need to know the common routines and scripts of PUA!
- QT | string generation QR code function
- Image feature SIFT (scale invariant feature transform)
- [internationalization] decimal point and comma of application development
猜你喜欢

Introduction of some functions or methods in DGL Library
![[wechat applet development (II)] custom navigation bar](/img/87/d390b50d1bd23acee9b46fbe7fe180.png)
[wechat applet development (II)] custom navigation bar
![[wechat applet development] (III) homepage banner component uses swiper](/img/d6/28252a4bb6425d53715221f7665b04.png)
[wechat applet development] (III) homepage banner component uses swiper

MySQL日期格式化

The vision group of Hegong University Sky team trained day3 - machine learning, strengthened the use of Yolo models, and learned pumpkin books and watermelon books
![[wechat applet development] (IV) uni app from getting started to giving up](/img/ed/03e4db18aa5705d38ec17ef982b0c7.png)
[wechat applet development] (IV) uni app from getting started to giving up

Figure New Earth: how the RVT format BIM model modeled by Revit can accurately match the map with texture

Image feature SIFT (scale invariant feature transform)
![[wechat applet development] (I) development environment and applet official account application](/img/94/b93d5fb6d9e3515a1f218cc4ec6eef.png)
[wechat applet development] (I) development environment and applet official account application

My six months at Microsoft
随机推荐
*Yolo5 learning * data experiment based on yolo5 face combined with attention model se
[wechat applet development (native)] canvas animation
赛宁TechTalk丨攻防演练:攻击组合拳 “稳准狠”渗透
[Google play access] payment server token acquisition
[wechat applet development (II)] custom navigation bar
*Code understanding *numpy basic (plus code) that must be understood
【游戏合集】手机都要被塞爆了,6款优质Pygame游戏合集降临~(附源码)
Kotin fragment the correct way to get ViewModel instances
Private traffic + apps, new opportunities for e-commerce drainage
Case practice - panoramic image mosaic: feature matching method
Kotlin coroutine (II): scope and cancellation
Learn - use do... While loop according to the formula e=1+1/1+ 1/2!+ 1/3!+…+ 1/n! Calculate the value of E (accuracy is 1e-6)
P1739 expression bracket matching problem solution
Markdown basic grammar learning
[MySQL] installation tutorial and master-slave configuration
Kotlin coprocess analysis (III) -- understanding the context of coprocess
SIFT feature point extraction
[ByteDance] ByteDance access (including login and payment)
The vision group of Hegong University Sky team trained day3 - machine learning, strengthened the use of Yolo models, and learned pumpkin books and watermelon books
Learning dynamic Siamese network for visual object tracking full text translation