Manikandan Parthasarathy wrote:We have a Java/J2EE enterprise application which gets details from backend systems via webservice. The webservice have their own data model.
My question is
1. Is it a good practice to use the AS-IS data model retrieved from the webservice response?
2. Or to have our own data model and map the details retrieved from response?
could you please help me with the above?
P.S. we will use 40-60% of the data retrieved from the webservice response.
can you please explain what is AS-IS data model??, you mean build the data model in sync with the response XML(i.e mapping table column properties with XML element properties) or build the data model with more generic structure and map the retrieved XML to fit your table structure.
If it is option-1, then it will serve the purpose for shorterm, but when the response xml changes or new properties are added then altering the data structure will be painful.
We have a similar kind of communication with our client, we store the XML(both sent and recieved XML) in a sepearate table as varchar, and later we retrieve the XML to populate data to our more generic/customized data model...hope this helps....