当前位置:网站首页>[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 .
边栏推荐
- *Yolo5 learning * data experiment based on yolo5 face combined with attention model se
- Wechat official account configures custom menu jump applet and automatically replies to jump applet
- Solution of p3916 graph traversal problem
- 赛宁TechTalk丨攻防演练:攻击组合拳 “稳准狠”渗透
- Do you want to have a robot that can make cartoon avatars in three steps?
- Opencv project practice - credit card recognition
- 1005. Maximized array sum after K negations
- Implementation of unity hub free version
- how to add square on screenshot
- Is it safe to open an account online in Beijing
猜你喜欢
![[matlab] (III) application of MATLAB in Higher Mathematics](/img/ff/72b13fb597d5bdf3a989dd86cb6888.png)
[matlab] (III) application of MATLAB in Higher Mathematics
![[redis] how much do you know about bloom filter and cuckoo filter?](/img/f0/8bcbe82bd6d412e68d85450f5894e3.png)
[redis] how much do you know about bloom filter and cuckoo filter?

*Code understanding * common function parsing in pytoch

Learning dynamic Siamese network for visual object tracking full text translation

Image feature SIFT (scale invariant feature transform)
![[wechat applet development] (III) homepage banner component uses swiper](/img/d6/28252a4bb6425d53715221f7665b04.png)
[wechat applet development] (III) homepage banner component uses swiper

nacos报错: ERROR Nacos failed to start, please see D:\nacos\logs\nacos.log for more details.

JSON extractor use in JMeter

My six months at Microsoft

Figure New Earth: how to import CAD files with modified elevation datum (ellipsoid)
随机推荐
Common DOS commands
Uva572 oil deposits problem solution
Project practice - document scanning OCR recognition
33-SparkSql的介绍、DataFrame和DataSet
The difference between online learning and offline learning
图的认识与存储
P1305新二叉树题解
SIFT feature point extraction
Use of animation expert motionlayout layout
Figure New Earth: how to import CAD files with modified elevation datum (ellipsoid)
Stack / heap / queue question brushing (Part 2)
[matlab] (IV) application of MATLAB in linear algebra
赛宁TechTalk丨攻防演练:攻击组合拳 “稳准狠”渗透
Intelligent robot and intelligent system (Professor Zhengzheng of Dalian University of Technology) -- 5. Bionic robot
Svg from entry to regret, why not learn it earlier (graphic version)
As skillfully uses idea annotation to improve collaboration / development efficiency
Recognition and storage of Graphs
nacos报错: ERROR Nacos failed to start, please see D:\nacos\logs\nacos.log for more details.
[MySQL] installation tutorial and master-slave configuration
Figure New Earth: how the RVT format BIM model modeled by Revit can accurately match the map with texture