Help with XML file storage

2

Good afternoon!

I am developing a system for product registration. However, I am thinking of creating an XML file to store the general characteristics of the products (other information will remain in the database), since each product has its specific attributes. The structure would be +/- thus:

<produto id="1">
   <atributo>Editora</atributo>
   <decricao>Globo</descricao>
</produto>

<produto id="2">
   <atributo>Altura</atributo>
   <decricao>1,65m</descricao>
   <atributo>Largura</atributo>
   <decricao>5,00m</descricao>
   <atributo>Material</atributo>
   <decricao>Sucupira</descricao>
</produto>

The problem is that the quantity of products registered will be huge (I believe thousands)! So this xml file will get very large.

I would like to hear from you if it is feasible to use an XML file for this purpose. And if it is also possible to use it together with a DBMS to facilitate the search within that file.

Thank you, André

    
asked by anonymous 23.06.2016 / 22:00

1 answer

4

Store the information in the DBMS, XML files are useful for storing configurations or transport data via WebService.

If you are not creating an API to be consumed, you will not need XML.

As for the performance issue, you should first measure the performance to better evaluate the points of improvement. This step should come when the application is ready. You can optimize SQL queries and create indexes in the database tables, or even make use of memory cache. Never use a file as a database.

    
23.06.2016 / 22:05