Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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 ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Persisting data when data config/validation in contained in an xml file  RSS feed

Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a webapp that validates and then uploads data (mostly in the form of spreadsheets). Each project has their own individual xml file that specifies what data is valid for the project. This xml file contains information such as required columns, recommended columns, acceptable values for a column, etc. We are currently a triple store to store the data and a rdbms to store the metadata (project information, individual data upload metadata, etc), however a customer wants to use mysql to store the data.

1. The data will need to be queryable. Therefore, I think the best option would be to create a db column for every "column" specified in the config xml. When uploading, a user will be inserting/uploading multiple rows, so I think that doing a batch csv load to mysql will be best. From testing, this was much faster then writing insert statements from the uploaded spreadsheet. Does this seem like the best option?

2. The xml files are mostly static, however there could be a column added or removed. Because of this, we need to verify that the database matches the config file whenever someone uploads data and throw an error if the database and config file don't match. How would you recommend doing this? Is fetching the column_name from INFORMATION_SCHEMA.COLUMNS and comparing them to the config file the best option? We would be using jdbc for the csv load, but jpa entities to represent the table. The other option would be to compare the Entity object properties to the config file (using reflection?).

Thanks in advanced!
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!