Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

suggest me the possible ways of doing it?

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam having different forms releated to student profile(like personal information and contact information) and these forma data will be entered into database..I have done that..
Now apart from that i will get the same data from a file which i have to read and write it into the databse..
For that i have to give them a particular file format so that i can get data in a particular way..so that i can split and store it in databse.
Can any one suggest me some file formats....
what i have done is all the fields in a form ..i wrote on the top of the text file with file separator as ^ and below comes all the student data, but in all there are about 50 fields...writing all this in one row i think it is not the better way..there is every possibility they can escape the special character..
can any one suggest me the better way..

Also one more problem is i have divided the address into 6 fileds i.e
1.Line1
2.Line2
3.city
4.postal code
5.state
6.country
all these data will be sent into one column in the database...
I have mentioned this in the file format as AddressLine1^AddressLine2^AddressCity^AddressState^AddressPostalCode^AddressCountry..
Now tell me how can i frame my file format in a better way so that i can receive the address and all other form data from a college..
Suggest me some ways of doing it...
thanks in advance
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Abhishek Reddy Chepyala:Now apart from that i will get the same data from a file which i have to read and write it into the databse..


Why do you want to repeat the same job from different sources?


Now tell me how can i frame my file format in a better way so that i can receive the address and all other form data from a college..
Suggest me some ways of doing it...



You can do with a .csv file. csv stands for Comma Separated Values. Just google for the same. You can get it.
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know who will create that file, but I let my users just use Excel and data could be read in following a ODBC-JDBC bridge.
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An XML structure would be the most structured approach is what I feel. Its a lot more easier to debug and the XML Parser unit that you could write could be made to handle it in a very generic manner.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Arundhathi Menon:
An XML structure would be the most structured approach is what I feel. Its a lot more easier to debug and the XML Parser unit that you could write could be made to handle it in a very generic manner.



Yeah thats true. But as the OP's requirement, if in case of the input file is gonna be too lengthy, then there may be issues in converting the XML structures into Java objects and you may end up in OutOfMemoryError.
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic