I have a client requirement in which I am asked to link autocad files with a table in DB. The file names will be stored in this table. This DB will be in the AWS cloud. The files will be mostly read only and downloaded by customers from the cloud.
Here's what is needed -
Need to show a huge list of equipment's
Each row will show equipment name, description and will show 3 options
Option 1 Download drawing file
Option 2 Download pdf manual for this equipment
Option 3 Download file which contains Unique ID for this equipment
I am not sure how to go about this. My questions to everyone reading this are as follows -
1. Should I be storing autocad files in a DB table or should I keep them in a folder and refer to them as and when needed?
2. If I should be storing it in a DB which database and datatype should I use?
3. Can someone tell me how I should go about implementing this.
Any help is much appreciated.
Thanks
Here is discussion on the pros and cons of storing large files in a db: Is it a bad practice to store large files (10 MB) in a database?.
I would suggest either storing fs locations in the db or using a JCR implementation (example Apache jackrabbit) to manage your files.
Related
I am trying to save some documents/Images and files in sqlite database. The documents contain different types of pdf,.doc etc files and different format images. Now once I stored it in the blob format, I want to do a backup of the database to sdCard. I however want this backup to be readable only by app for securing the data inside.
Now the question is , for storing different types of files, Do I have to use some sort of other database and for securing. what should I do?
Best Regards
Android's built-in SQLite does not support encryption.
Try instead a library like SQLCipher.
One solution is to use blob and to store the raw data of the file as a column in the db as you are currently doing.
Other solution which I think is better to store the files on the Internal Storage and just store the file paths in the database. Internal storage is private for your application so no one will have access to the files, so your security concerns are taken care of.
see here for how to do this:
Creating folder in internal Memory to save files and retrieve them later
But be aware that can using too much internal storage can make people's phones run out of internal storage and they might decide to delete your app.
According to current requirement,user will upload files with large size,which he may like to download later. I cannot store the uploaded files in DB because the size of files is large and performance will be impacted if I store uploaded files in DB.
Any one knows any java plugin which provide efficient file management on webserver and maintains the link to file so that the file can be downloaded when the link is requested. Also the code will make sure that user will be able to download only those files which is uploaded by them,they cannot download any file just by modifying the download link etc. I am using spring3 as the framework.
Please suggest how to solve this problem?
if you have write access to the file system why not just save them there ?
you then generate an unique ID and save the hash/file relation in db, you then need to supply the ID to get the file feed from a servlet
Store the file content on a part of filesystem out of web application so you cannot reach it changing the link.
Then you can store on db the path for that file, and return them only if the user has the permissions to read it.
Pay attention, do not store all the file on the same folder, or the number of files could grow too much. So find a way to store them with more folder levels.
I am creating application in j2me. There is a huge data with whom I have to deal.
I have used RMS but speed of retrieving a data from RMS is tedious process. It takes long time then normal speed.
I can't use File because it requires permission every time whenever I fetch data or store data.
so is there any other options for storing large data in j2me.
Thank you....
Some third party database available for j2me application. See this link for list of database.
Store the data into text files and store the text files into your project workspace. You can read the data from this text files.
Finally you can store the data into server and fetch the data from server using webservice. But needs GPRS.
I preferred last point for using huge data.
1.
Some third party database available for j2me application. See this link for list of database.
2.
Store the data into text files and store the text files into your project workspace. You can read the data from this text files.
3.
Finally you can store the data into server and fetch the data from server using webservice. But needs GPRS.
I preferred last point for using huge data.
harsh
I need to read .rpt files and load the data into MySQL or Oracle using Java.
Can anyone help in this?
As far as i know, .rpt files are used by BIRT.
Are the .rpt (report) files processed in any way or do you just have to write them into a database?
In case of the latter, the necessary steps are:
Create a list of all .rpt files
For each of the files:
Read the file into a String
CREATE a SQL INSERT statement and execute it against your database
Profit.
I will expand this answer if you clarify your requirements.
I am having a database in .dbf (FoxPro) format.
How to retrieve data from FoxPro using Java?
If the data can be migrated to MySQL, How to do the conversion?
Taking the data to intermediate formats seems flawed as there are limitation with memo fields and CSV or Excel files.
If you are interested in a more direct approach you could consider something like "VFP2MySQL Data Upload program" or "Stru2MySQL_2", both written by Visual FoxPro developers. Search for them on this download page:
http://leafe.com/dls/vfp
DB-Convert (http://dbconvert.com/convert-foxpro-to-mysql-sync.php) is a commercial product that you might find helpful.
Rick Schummer, VFP MVP
You can use XBaseJ to access (and even modify write) data from FoxPro databases directly from Java with simple API.
This would allow you to have the two applications (the old FoxPro and the new Java one) side by side by constantly synchronizing the data until the new application is ready to replace the old one (e.g. many times the customers still hang on and trust more their old application for a while).
Do you have a copy of FoxPro? You can save the database as an HTML file, if you want. Then, from HTML, you can save to any format you want. I recently did this to save a FoxPro table as an Excel spreadsheet (not that I'd suggest using that for your Java code).
If you plan on using Java, once you have access to the data, why not use one of Java's native storage types?
I worked on the same project once long back where the project had be done with FoxPro and then we migrated that project to Java with MySQL.
We had the data in Excel sheets or .txt files, so we created tables as exact replica of the FoxPro data and transferred the data from the Excel/CSV /txt to MySQL using the Import data feature.
Once we did this, I think further you can take care from MySQL Data.
But remember work will take some time, and we need to be patient.
I suppose doing a CSV export of your FoxPro data and then writing a little Java programme that takes the CSV as input is your best bet. Writing a programme that both connects to FoxPro and MySQL in Java is needlessly complicated, you are doing a one time migration.
By the way PHP could do an excellent job at inserting the data into MySQL too. The main thing is that you get your data in the MySQL schema, so you can use it with your new application (which I assume is in Java.)
Two steps: DBF => CSV and the CSV => MySQL.
To convert DBF(Foxpro tables) to CSV the below link helps a lot
http://1stopit.blogspot.com/2009/06/dbf-to-mysql-conversion-on-windows.html
CSV => MySQL
MySQL itself supports CSV import option (or) to read csv file this link helps
http://www.csvreader.com/java_csv.php
I read the CSV file using Java CsvReader and inserted the records through program. For that i used PreparedSatement with Batch the below link gives samples for that
http://www.codeweblog.com/switch-to-jdbc-oracle-many-data-insert/