Current project situation.
- Get lot of XML from outside system whose size is less than 50KB and if it contains an attachment, the size would be around 5MB MAX. XML structure complexity is medium because of inner nested elements. There are ~70 first level element and then its child and child of child... Storing that XML in String column of MS SQL server.
- While storing XML, we read Search criteria field from XML and maintain them in new columns to improve search queries.
- Search functionality to display these messages data in the form of list. Search criteria fields(optional ~10 fields) are from XML elements. Parse that XML to show the elements(around 10 -15) in lists
- There are chances of reporting functionality too in future.
Challenge with this design: If new functionality introduced to search the list based on new criteria, then need to add one more column in DB table and have to store that field value from XML which is not best part of this design.
Suggested Improvement: Instead of storing an XML in String format, plan is to store it as an XML column to get a rid of extra columns to keep value of search fields and use XML column query for search and fetch.
Question:
- Which DB will give me optimum performance in case of search? I have to fetch only the XMLs which are fitting inside that search criteria.
- SQL or NoSQL like MongoDB?
- Is there any performance metrics available? Or any case study for same?
- DB to manage Reporting load.