Answer the question
In order to leave comments, you need to log in
Tree structure. json or xml?
I'm writing something like a hardware database. The following logic is planned: the RAM stick is in the motherboard; the motherboard is in the system unit; system unit at the workplace; workplace in such and such an audience, etc. Those. get a tree structure.
I think to store all the information in one line in the table, starting from the building number and ending with the components inside the system unit. The question is which format is better for this - JSON or xml? Is there any fundamental difference?
Perhaps, what on structure of a DB you will advise?
Answer the question
In order to leave comments, you need to log in
For your case, XML is better, as it is more readable. Let it take up much more space, for some reason, if you need to upload it to a file, you can always figure out what and where with the naked eye. It will also be possible to generate "excerpts" from the entire database, for example, an XML report on a separate building (it is desirable to add CSS for beauty).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question