I have a jsp page with one browse button and one submit button.After selecting any excel file(.xlsx) when I click submit button, I want to store all the value of excel page to postgresql database.
There is no simple and ready solution. You have to build implementation parsing .xlsx, handle data, and then insert into your database.
You can use Apache POI or JExcel for parsing Microsoft documents.
Working with database:
JDBC
Or you can use framework for simplify your job:
Spring JDBC
Or you can use ORM, if you will work with many entities and frequent CRUD operations:
Hibernate
Related
i have a spring boot Web application with Spring Data JPA and Hibernate and a want to write a Java handler to check in time intervals the fill level of my postgresql database and delete old data accordingly. for example if it reach a max of 10 GB the database has to delete the old data. Is there any Java Library or any suggestion for this purpose? I found only SELECT statements to perform directly on the PostgreSQL Database (https://wiki.postgresql.org/wiki/Disk_Usage)
We are using jhipster generator for our new project. to store data it we select Postgres as well as elasticsearch, all search operation will perform using elasticsearch.
when we start the application, It use liquibase to upload csv files and dump data into tables.we added number of csv file and made some change on liquibase configuration files as well, but the problem we found right now that it is only dumping csv data into Postgres only, we are not able to find data dump into elasticsearch.
I do some research and found this.
but still, I am struggling with implementation, any advice will be really helpful.
The JHipster Elasticsearch is indexing on every change over the REST resource. See here. This means that all your data which you are inserting over liquibase is not getting indexed. You can use the generator-jhipster-elasticsearch-reindexer to reindex data which is already in the db.
i made a javafx application using MySql database , and now i want to use an embedded database.
whitch do you think is most similar to mysql , because i don't want to change too much in my program "queries".
You could use SQLite.
For basic SELECTs and most CRUD operations is the same as any SQL server-based engine.
I have created a JAVA Soap web service that inserts data into mysql using JDBC. i want to modify it so that it inserts data into a Excel table instead of mysql. Can someone please give a in depth description as to how i can do it. I do not know how to use excel. So i expect a clear explanation
Excel table isn't a data structure, its a software.
You could build a file in a form that excel respects, like xml or csv,
and opening the file using ms-excel.
https://docs.oracle.com/javase/tutorial/jaxp/xslt/writingDom.html
I am working on a Java program that connects to a databases and serves as a design and data manipulation tool. I eventually want to port my program to an XML database of some kind.
More specifically, I want to be able to use Java to upload XSD (representing a database) that I generate to an actual XML database (like Sedna) and then connect to this database and query/update it.
I have been exploring Sedna and the XQJ API and I don't see how to do this. Can it be done through Java?
Edit I don't have any data I want to map to XML or a database. I have a database structure specified in XSD, and I just want to create the corresponding database on a server somewhere.
There are at least two frameworks worth trying for XML to database mapping:
Castor XML http://www.castor.org
Hibernate http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/xml.html