Похожие чаты

Is my understanding of DB access correct? There's 3 main ways

to connect to DB with Java/spring.

1. Jdbc client, for low level access with SQL statements.

2. Spring data jdbc, a higher level abstraction on jdbc that auto implements crud methods.

3. Spring data JPA, even higher level abstraction that implements the JPA interface. Typically uses Hibernate ORM.

Additionally, there's JDBC template but that's older and jdbc client is preferred now.

1 ответов

24 просмотра

Almost correct. 1 - yes. 2 - yes. 3 - yes. > there's JDBC template but that's older and jdbc client is preferred now That's not correct. Or at least part of it. jdbc client - is the oldest technology, it's from 90-s. Just try to use it or check out examples (I'll google couple of such for you at the end) to see how hard to work with it on a larger scale, when you add more and more tables, and how repetitive that code will be - ~80% of it will be about *mapping* from SQL result into a POJO that represents data of a table. JdbcTemplate - is a technology from spring-data-jdbc (if I'm not mistaken), and is a more convenient version of low level jdbc-client. And it does that tedious mapping for you.

Похожие вопросы

Обсуждают сегодня

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
any reference of this implementation?
BitBuddha
29
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Hi guys, any problem with Pulsebrige? Trying to transfer from wETH to ETH. First it tells me to connect my metamask "through mobile app" not desktop. Then I did and confirmed ...
Snowflakecrypto
11
Ⓐrtto, [4/23/24 7:02 PM] Please explain more fully how it is not working exactly, and what are the steps you are taking, and what error messages come or what happens. Ⓐrtto, ...
Ezza Kezza
2
sounds like people have lost their kaspa on tradeogre... does this mean tradeogre not trustworthy?
Ezza Kezza
15
Привет)) уже кажется эту тему перемусолили, но вот я так и не понял. Я сейчас сижу на 27дюймов 2к мониторе. На Актуальной макоси, если я куплю 27д 4к монитор: - будет ли изобр...
Vladislav Piskunov
11
Страшнейшая правда про списки ЦБ. С первых дней жизни P2P сферы, молодые человеки, начитавшись законодательной базы и "внутренних" документов, решили, что им противостоит сер...
Foxcool
3
Карта сайта