Skip to content
Advertisement

Tag: mysql

Batch select and iterate mysql results in java to decrease waiting time

I have made an application that visualizes locations with diatom species found at those locations. My problem is, it’s extremely slow. When 128 locations are found, it takes roughly 130 seconds to visualise. With 6000+ locations in my database, this would be way too slow. The reason for this speed is the way I’m retrieving all diatoms found at a

Who should be parent in spring JPA relationship

I have 3 tables book, publisher, author. Here author and publisher can refer to same record in book therefore I decided to make book as relationship parent. However I also want to make it so that if a publisherA is deleted, all the book record related to publisherA also get deleted. same goes for author. I tried using cascade, but

Db insertion row if not exist spring boot

I have a two instances of one spring boot microservice. If two requests are sent at the same time, and the second request can update the row that was created by the first request. How i can prevent this? For example the table contains this columns :id,format,username,groupName and if a row exists (3,”test”,”test”,”test”) and if we try to insert another

Android Studio Connect to Socket server

I have a server running in Java using Eclipse (Here the full code): As you can see, the client sends 2 values and receives 1, the first one is for the switch, which will indicate what to exceute, for now I just have on option (checking if email exists in the ddbb), the second value is the email as the

Pulling data from json inside mysql to java

So I have a claim script that I’m trying to put together, that claims the product after purchase. The program is built inside of Java. The problem I’m running into is that there is a custom field they input on their purchase, and the store itself inserts it into a JSON format. So I need to execute a query that

org.hibernate.hql.internal.ast.QuerySyntaxException: Apartment is not mapped [from Apartment]

I have springboot rest appplication with Hibernate and MySQL. I have this error: nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.hql.internal.ast.QuerySyntaxException: Apartment is not mapped [from Apartment] But I dont know where I have a mistake. I have two tables: Apartments and Residents in DB. But now I try only getAllApartments() method. I use Intellij and I even checked my DB in her.

Save a Resultset to an Array in java

I want to save the result of a whole Mysql table in an array it returns this to me from the database run: brandon Brandon Julio Daniel BUILD SUCCESSFUL (total time: 1 second) I want to save what is in the database in an array to be able to implement it with a sort and search method that’s why I

How would I get multiple results from a MySQL table? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question Say I have 2 columns, the first one is ID and the second one is colour. How would I search

Advertisement