4 ms·
> Here are some very frequently occurring examples of bad schema design: (4 lines, 75 characters) > Here's the right way: (10 lines, 133 characters) I have
by CobrastanJorji 7y ago
> Here are some very frequently occurring examples of bad schema design:
(4 lines, 75 characters)
> Here's the right way:
(10 lines, 133 characters)
I have a suspicion as to what went wrong.
- SamBam 7y ago> "But if the people who made the strange decision to use XML as a data format [...] they might realise that what they're doing is unsuited to it and unergonomic The author's point is that XML should not be a data format.
- zwkrt 7y agoIs there logic to the authors assertion past “that isn’t what XML was intended for”? It is a pretty nice data format if you want wide compatibility and schema integration.
- mrzool 7y agoThe point is, XML is not a data format. It’s a markup language.
- LudwigNagasena 7y agoI just invented XDF, it is exactly like XML, but it can be used to represent arbitrary data structures. Do you have any objections now?
- benibela 7y agoThat is only valid if the XDF standard has been published by the W3C
- gnulinux 7y agoThis doesn't make any sense. W3C doesn't restrict/define use cases of XML, it defines structure and semantics thereof; using it as-if it is an XDF document is perfectly ok, just like you can use XML data for your DASH stream etc... It's a structure on top of XML structure.
- tux3 7y agoXDF looks cool! Some of the design choices look pretty inefficient and arbitrary for a data format though, have you thought about rebranding it as a markup language? =] /s The point being, I think the author is arguing you should use the right tool for the job, and XML not being designed for arbitrary data structures makes it not the right tool. Just recently people have shown you can build a raytracing engine in SQL, but if someome was arguing we shall call it SQLCycles and ship it in Blender, I'd definitely have a few objections!
- Koshkin 7y agoIt would be a rather bad design. It would not survive a good design review.
- arkitaip 7y agoIn reality it's actually fine as a data format for lots of use cases.
- ako 7y agoDocuments are unstructure data, markup provides structure to unstructured documents, so xml turns documents into data.
- manicdee 7y agoThe author’s point is moot. XML is a markup language intended to convey semantics. By its nature it is a data markup language, because the intent is that a particular type of information lives in specific tags. For humans, this is documents with certain meanings attached. For computers, it’s documents with certain meanings attached. It’s all data. XML is a data markup language. It’s just that humans call it “semantics” in a “document.”
- benibela 7y agoI really like <root name="John" city="London" /> It easy to query with xpath It parses the same regardless of the order. With the right way, is <item><key>Name</key><value>John</value></item> the same as <item><value>John</value><key>Name</key></item> ?
- commandlinefan 7y agoWell, I would argue that he's _still_ wrong about the "right" way to represent this: the _right_ way would be: <name>John</name><city>London</city>.