L
L
longBurn2015-02-26 13:41:19
Java
longBurn, 2015-02-26 13:41:19

How to interact with a database in JAVA?

Good afternoon, comrades!
Not so long ago, I started learning Java from writing a simple, but affecting many technologies, application.
And now I come to the issue of interaction with the database.
I set one of the requirements for myself when developing an application: to conduct low-level development without affecting ready-made frameworks and auxiliary libraries.
So, for example, I implemented interaction with an external web server at the tcp / ip socket level.
What is the lowest level for interacting with the database? JDBC? What other technologies are there for interacting with the database? I know about Hybernate, is there anything else?
Thanks in advance for your help!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Martyanov, 2015-02-26
@vilgeforce

The same mysql has a protocol ( dev.mysql.com/doc/internals/en/client-server-proto... ), you can implement it. Just don't: there are libraries for working with mysql for popular languages.
Well, as a joke: you chose the wrong language for a low level, you should have chosen C / Asm :-)

A
Andrey Lebedev, 2015-02-26
@vanilla_men

It depends on what base, for InterSystems - there are low-level schemes, extreme java, globals.

L
lorka natas, 2015-02-27
@lorka

I would like to ask - why?
On a subject - for SQL flagships ODBC (limitedly usable by-product) and JDBC (there are still nosql decisions and some rather narrow gizmos). There are thousands of different protocols/solutions for non-SQL.
Arthur Asatryan - took a look at the link, shook it up -_-
Officially MySQL offers JDBC - how much "lower" do you need? At the TCP stack level?
In this case - try to describe for yourself a system that will support simultaneous queries, caching, nested queries, simple operators, indexing, typing, and hundreds of other things that have already been implemented by the manufacturer - how long will it take? How would you implement the same ResultSet? Simultaneous calls? Error handling? And when updating the DBMS - when the protocols change dramatically - what to do? For example, JDBC is a rather convenient and small library that allows you to work with MySQL database in any position, is constantly updated and does not even require financial investments - to reinvent such a bicycle is to spend thousands (I know, an optimistic forecast) of man-hours and eventually get .. .The same "framework".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question