Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jdbc]

The tag has no usage guidance, but it has a tag wiki.

1
vote
2answers
37 views

JDBC Connection Url Logging - Security Risk

In one of the existing batch process codebase, I can see a practice of JDBC Connection String is getting logged and also persisted. Logging or Persisting a JDBC Connection String alone may not be a ...
1
vote
1answer
22 views

Best practice to confirm unique username for user creation in JSP and JDBC?

First let me state the asynchronous approaches:- The user enters a character into the username form field. I create a connection to the database, use a prepared statement to confirm whether the ...
5
votes
1answer
188 views

Achieving scalability and ACID with a RDBMS to NoSQL streaming solution

My understanding is that the main feature Cassandra has to offer is linear performance at any scale; meaning that if I know 1 C* node can handle 500 queries or commands per second from my app, then I ...
2
votes
2answers
177 views

Achieving very large real-time async writes on MySQL tables without locking them to reads

I am building a webapp (Angular frontend, Groovy/Spring/Hibernate/MySQL backend) that will allow users to compete against each other over certain activities. Each activity will have 1 winner and 1 ...
-1
votes
4answers
392 views

At what stage of a Java project do you configure GUI components?

I need a little advice with project design. I have taken on a personal project to enhance my knowledge of Java Swing, API integration, JDBC and OOP I have chosen to do this in Java as I previously ...
-1
votes
1answer
731 views

What is a recommended way to store database information?

I am using a Java to connect to MySQL database. I want to iterate through this data and store it into a data structure. This data structure will be JSON.parse() and converted from server side to ...
-1
votes
1answer
83 views

Unit testing a general purpose database library

Many moons ago I built a utility library that wraps the JDBC libraries with classes that allowed for functional-style approaches. I've used this library for my own purposes for many years. I've long ...
3
votes
1answer
1k views

How to properly serve large video files stored outside a MySQL database

I'm trying to build a Java application that connects to a remote database that stores and retrieves video files that can be over 200MB. I could store/retrieve these files in MySQL directly as ...
4
votes
4answers
19k views

How to write a proper class to connect to database in Java

I'm currently writing an application and I'm struggling with the decision of how to correctly design a class to connect to a database. I came up with something like this: public class ...
1
vote
0answers
402 views

Is BoneCP + JDBC a good alternative to JPA/Hibernate?

To some extent, I don't have a problem with JPA which inevitably needs an implementation such as Hibernate. However, it requires configuration and ORM. I don't specifically like using Hibernate ...
-1
votes
1answer
128 views

Is it ok to fire database queries again and again?

I am preparing a Java project and working on MySQL database. Currently I am stuck at a point where I want size of the resultset before I can actually fetch entries from it. The fetching of size is ...
0
votes
1answer
89 views

How to import driver details and Connection details without writing it manually or hard coding?

class ConnectionUtil{ public static void main(String args[]){ try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection( "jdbc:oracle:thin:@localhost:...
2
votes
4answers
376 views

Executing queries against multiple separate database instances

Premise I have a number of database servers (different DBMS instances, installations in different physical locations), each of them contains data and uses the same schema. Most of the data is ...
0
votes
2answers
8k views

Managing multiple JDBC connection

I have an application that connects to databases based on a json string that contains connection information. The json is sent just when the application starts. How do you manage such connection ...
0
votes
3answers
192 views

How can DB and UI agree on default values?

I created a table in a Postgres database. I would like to create a form in a Java application to insert rows into that table. Certain fields have default values. What is the best way for the database ...
4
votes
1answer
622 views

Database Password problem when using GIT to manage project that uses Spring to initiate Datasource

I use Spring Framework to code my Web Service, using Dependency injection to inject a DataSource bean into the DAO bean that will be used by the Web Service. I have all the database properties(Url, ...
2
votes
2answers
785 views

Design for reusable java module which uses DB connections

I'm tasked with changing some procedural Java code into Object Oriented re-usable module. It's an XML generator utility which uses velocity for XML generation. There are also business rule enrichments,...
1
vote
1answer
2k views

Using JDBC to asynchronously read large Oracle table

What strategies can be used to read every row in a large Oracle table, only once, but as fast as possible with JDBC & Java ? Consider that each row has non-trivial amounts of data (30 columns, ...
0
votes
0answers
433 views

What is special about JDBC that makes it unlikeable for JavaScript

Quoting from Selenium Architecture A natural implementation would have been to provide a database connection to the underlying data store, using something like JDBC. Eventually, we settled on ...
0
votes
1answer
613 views

Spring JDBC Template without DAO?

I am rather new to writing applications that interact with databases, and I'm curious about a project I'm working on. I have to write a very simple web app which is going to be displaying metric data ...
1
vote
1answer
3k views

Notify client about changes in database in Java

I'm working on a distributed client-server system that uses TCP. The program's functions is to transfer money to an from the server, but also between the clients, a sort of MobilePay. When one ...
1
vote
1answer
549 views

Do we need to use JCA while connecting to db from inside EJB

While writing an EJB (deployed on WAS) that connects to a db, i have never needed to use JCA. But apparently JCA is the standard for connection to thrid party EIS (which includes database). So does ...
1
vote
2answers
419 views

I am new to programming and I am interested in jdbc - Tips and Advice needed [closed]

I am currently acquiring my associates degree in software engineering. I have been told in order to be successful in a computer science field you have to specialized in something. After researching ...
4
votes
2answers
2k views

Why shouldn't you use JDBC in Java applets?

I've heard people saying usage of JDBC (Java Database Connectivity) isn't recommended in Java applets. All I they say is: 'because of the security reasons'. What 'security reasons' do they mean? What ...
2
votes
2answers
2k views

Migrating from jdbc to MyBatis — advice needed

I am working on a Java application (an ERP) that has grown pretty large, and will continue to grow for the next couple of years. We have been using Spring-JDBC for our DAO layer. But the amount of ...
4
votes
2answers
2k views

Manage query strings in JDBC methods

I am trying to find out which is the best practice when organising the PreparedStatement strings in a application which uses JDBC to connect to the database. Usually this is the way I retrieve the ...
0
votes
1answer
4k views

Size of database a factor for Hibernate vs JDBC?

Do you know if the size of the database (number of tables used) is a factor when choosing between Hibernate and JDBC? Why or why not? In my particular case, I am evaluating Hibernate and JDBC for ...
5
votes
2answers
397 views

Server and MySQL safety for Java / JDBC applications?

I have an external java application which use JDBC as to reach an MySQL database. This will be used by many people and is going to store all the people's data on the same server / MySQL. As I bet ...