4 ms·
wouldn’t an XML database be easier?
by librasteve 1y ago
wouldn’t an XML database be easier?
- floating-io 1y agoDoes an embeddable XML database engine exist at a similar level of reliability?
- supportengineer 1y agoNo.
- renecito 1y agoLOL!
- duskwuff 1y agoYou can't* index into XML. You have to read through the whole document until you get to the part you want. *: without adding an index of your own, at which point it isn't really XML anymore, it's some kind of homebrew XML-based archive format.
- Mikhail_Edoshin 1y agoThis applies to any secondary index. The data themselves can only be ordered by a single criteria. It may be a meaningful one, but I guess in most cases it is merely the internal ID, which means you will have to scan the whole table too. XML was meant for documents so in most cases the sequence of elements is given. But technically if I compose XML myself I can lay it out the way I want and thus can have it sorted too. This means it will be directly searchable without an index: read a bit at the middle, find an element name, see where we are, choose head or tail, repeat.
- duskwuff 1y agoBlindly seeking into XML data is a risky, error-prone approach. It's not impossible to do, but doing it correctly is difficult - even if the tags you're looking for are unique, there are a lot of messy edge cases involving comments and <!CDATA> blocks.
- _ea1k 1y agoThey could resurrect xindice!
- Zambyte 1y agoWhy?
- HelloNurse 1y agoYou can store the content of a XML document in a database faithfully enough to reconstruct it exactly. Any system that can produce XML documents is a "XML database".