Questions tagged [jdbc]

JDBC is a data access technology providing API's for accessing a relational database.

32 questions
5
votes
2 answers

Server and MySQL safety for Java / JDBC applications?

I have an external java application which use JDBC as to reach a 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 people will be able to crack the .jar and see the…
Skarion
  • 83
  • 4
5
votes
1 answer

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 also can rest assured that 100 C* nodes added to…
4
votes
4 answers

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 DatabaseConnector { private Connection databaseConnection =…
Piter _OS
  • 91
  • 1
  • 1
  • 6
4
votes
1 answer

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, Password, Username, the stuff I don't want people…
Louis Hong
  • 165
  • 5
4
votes
2 answers

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 would a potentially 'bad person' do when he/she…
BMC
  • 43
  • 1
  • 4
4
votes
2 answers

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 data from the database: PreparedStatement select =…
Ionut
  • 537
  • 5
  • 14
3
votes
1 answer

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 LONGBLOBs, yet I read again and again how that's bad…
dyslexit
  • 139
  • 1
  • 3
2
votes
1 answer

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 username already exists, close the connection, and…
Nikhil
  • 29
  • 2
2
votes
2 answers

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 loser. I want a live user ranking system that ranks…
smeeb
  • 4,820
  • 10
  • 30
  • 49
2
votes
4 answers

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 completely the same across all databases, but…
2
votes
2 answers

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, all of which is configurable in Database…
Plaiska
  • 33
  • 4
2
votes
2 answers

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 boilerplate code that needs to be written is slowing…
Akshay
  • 123
  • 6
1
vote
2 answers

What directories and files should I push to my Git repository from local?

I have been using Netbeans to practice JDBC coding. Netbeans projects create multiple sub-directories (/build, /lib, /src...). Should I add and commit all of these directories and files or should I only choose the java code located in /src? I am new…
CLopes1987
  • 33
  • 1
  • 5
1
vote
2 answers

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 security issue. Though, it's a little discomforting…
Divs
  • 187
  • 7
1
vote
0 answers

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 directly, based on the fact that it is a vendor…
1
2 3