News for hackers. Stuff that matters.
Re:What If OpenDocument Used SQLite? by peterkelly on Thursday November 02, 2017 @02:48AM (#15608344)
That would be coming full circle, and going back to the bad old days of binary .doc and .xls files, which used an efficient data store for fast incremental updates:

https://www.joelonsoftware.com/2008/02/19/why-are-the-micros...

OpenDocument and its competitor (OOXML) both use zip/XML for portability reasons. Yes, they're less efficient. But they're also completely independent of any specific software implementation [1].

[1] Mostly - OOXML has some parts that depend on MS Office's implementation. But ODF is completely described by the spec.

Re:What If OpenDocument Used SQLite? by abtinf on Thursday November 02, 2017 @03:01AM (#15608385)
I don't see how your comment is responsive to the excellent article.

doc and xls were proprietary binary formats.

sqlite files couldn't be more open - the software to interact with them is in the public domain and ported everywhere.

And the article itself doesn't even suggest using sqlite as a binary store. Rather, it suggests using the capabilities of sqlite to augment text-based data.

Re:What If OpenDocument Used SQLite? by da_chicken on Thursday November 02, 2017 @12:39PM (#15611973)
Let's say you want to extract an image file from an .odt file and you haven't got Writer installed. You can do that by extracting the file from the .odt using unzip or similar.

This article champions the idea that you should store the files as compressed binary BLOBs in SQLite. What does that mean you need to do? Connect to the file with SQLite, fetch the BLOB, hexdump it since it will return as a string, decompress it, and then save it to disk. Or save it to disk and then decompress it. You'd have to do something like this: https://stackoverflow.com/questions/15448373/how-to-dump-a-f...

That is what Open Document is supposed to end.

This is not an excellent article. It's complaining that the Open Document Formats are bad because they don't use an optimized format. They're not supposed to be optimized. Documents aren't large enough to cause the types of problems that databases are intended to fix. They're supposed to be portable and easy to work with. They make it possible to access your data using the most basic computing tools: a ZIP archive tool and a text editor. That's the whole point.

Re:What If OpenDocument Used SQLite? by SQLite on Thursday November 02, 2017 @02:08PM (#15612735)
If you have an image stored in an SQLite database file, you can extract it using the "sqlite3" command-line tool as described at https://www.sqlite.org/cli.html#file_i_o_functions

Or, you could do it several dozen other ways. For example, maybe you have an archiver tool for SQLite that works like "zip" - https://www.sqlite.org/sqlar/doc/trunk/README.md

About this much we agree: The objective is to make the content of the document more accessible and easier to use. The article intended to show that using an SQLite database rather than a pile-of-files in a ZIP archive achieves that goal. If my presentation were stored in an SQLite database, I might (depending on how the schema was structured of course) be able to ask interesting questions of the presentation, such as:

  *  How many pages are in this presentation?

  *  Which pages contain the word "discombobulated"?

  *  How many images are in the presentation?

  *  Does this presentation use a prepackaged background?

  *  Does the presentation begin with my companies standard "start" slide?
Can you write (say) a Python program that will answer any of the above about an OpenOffice .odp file? All I'm trying to say is that if OpenOffice .odp files were SQLite databases with a sensible schema, then probably you could answer any of the questions above with perhaps 5 lines line of code or less. Or just a shell script that uses the "sqlite3" command-line tool. As it stands now, if you want low-level information about an OpenOffice presentation, you have to open manually open the document on your disktop and click around - it cannot be (easily) automated. An ".odp" file is essentially an opaque BLOB that is not useful to me. Only the OpenOffice program (or its various forks) can access it.

I have 104 historical presentations in a folder and I want to find some slide I wrote years ago. Right now, I have to laboriously open each presentation and manually search for the slide I want. If the format were SQLite, I could perhaps do the same with a query, which if run from a shell script, would quickly search all 104 presentations for me.

So, Yes, the whole point is to make the content more easily accessible and usable. Relative to a pile-of-files in a ZIP archive, SQLite does exactly that.

Re:What If OpenDocument Used SQLite? by da_chicken on Thursday November 02, 2017 @05:01PM (#15614256)
> Can you write (say) a Python program that will answer any of the above about an OpenOffice .odp file?

Using the libraries or packages available from the OpenDocument home page? (http://opendocumentformat.org/developers/) Probably, yes. Four of your five questions questions are just: "Is there an API?" The answer is: Yes, yes there is. Did you try searching for an Open Document API? For the image file one, however, all you really need is ZipFile.infolist() because ZIP files already have an API.

> All I'm trying to say is that if OpenOffice .odp files were SQLite databases with a sensible schema, then probably you could answer any of the questions above with perhaps 5 lines line of code or less.

Most of the questions involve an XQuery against content.xml. You could iterate through the files, extract content.xml, and apply the XQuery. No, it's not easy to write the correct XQuery because XQuery sucks and the schema is complex, but it can definitely be done.

I don't know why you think it's going to be magically simplified by changing the storage method. You'd either have compressed XML BLOBs like the article's first suggestion -- which puts you right back where you already are -- or you'll have dozens of tables with a ton of metadata and document structure to dig through. Either way you will need a schema reference to understand what's going on. An RDBMS isn't going to make the content simpler. The schemas are complex because the documents are potentially very complex.

Re:What If OpenDocument Used SQLite? by SQLite on Thursday November 02, 2017 @05:32PM (#15614466)
> I don't know why you think it's going to be magically simplified by changing the storage method.

Because ZIP is a key/value store and SQLite is relational.

(Later:) Here is a slide comparing SQLite to ZIP from a talk I'm scheduled to give on Monday: https://sqlite.org/tmp/sqlite-v-zip.jpg

Both SQLite and ZIP will store files and both are well-established open formats with a trillion instances in the wild.

SQLite does everything ZIP does but also gives you transaction, a rich query language, a schema, and the ability to store small (1-8 byte) objects and to translate objects into the appropriate byte-order for the reader.

Re:What If OpenDocument Used SQLite? by asynchronous13 on Thursday November 02, 2017 @02:20PM (#15612871)
> It's complaining that the Open Document Formats are bad because they don't use an optimized format.

That's the opposite of what the article states. From the introduction of the article:

> Note that this is only a thought experiment. We are not suggesting that OpenDocument be changed. Nor is this article a criticism of the current OpenDocument design.

Re:What If OpenDocument Used SQLite? by da_chicken on Thursday November 02, 2017 @03:44PM (#15613589)
Yeah, and if you finish the quote, the next line is:

> The point of this essay is to suggest ways to improve future file format designs.

That makes it sound like, "No offense, but < extremely rude comment >." Just because they say they're not trying to be critical doesn't mean they're not actually being critical.

Re:What If OpenDocument Used SQLite? by justinclift on Thursday November 02, 2017 @02:09PM (#15612743)
> What does that mean you need to do? Connect to the file with SQLite, fetch the BLOB, hexdump it since it will return as a string, decompress it, and then save it to disk.

Or you could just use a SQLite GUI (eg sqlitebrowser.org). Select the field/BLOB you're interested in, then Export (saves it to a file). Done. :)

Re:What If OpenDocument Used SQLite? by mcguire on Thursday November 02, 2017 @11:57AM (#15611531)
The current Sqlite (post-3.0, 2004) file format:

https://www.sqlite.org/fileformat.html

File Format Changes in SQLite:

https://sqlite.org/formatchng.html

"Since 2004, there have been enhancements to SQLite such that newer database files are unreadable by older versions of the SQLite library. But the most recent versions of the SQLite library should be able to read and write any older SQLite database file without any problems."

Me, I'm just happy all my old doccies are in TeX.

Re:What If OpenDocument Used SQLite? by mseebach on Thursday November 02, 2017 @03:52AM (#15608586)
> sqlite files couldn't be more open

Yes, actually they could. They could be readable without any software at all. Like XML.

All of the improvements suggested in the article could be implemented by extending the XML format to allow including by other XML files by reference.

Re:What If OpenDocument Used SQLite? by jwr on Thursday November 02, 2017 @04:53AM (#15608798)
This is a common recurring theme that I find strange. Why do people believe that if something can be browsed with less/Notepad, it is somehow more "readable" than a binary representation? I've seen and worked with tons of XML, and most of it was utterly useless without accompanying documentation, just as a binary format would be. The fact that I could "see" the XML on my screen did not make the job easier.

The problem with formats "readable without any software" is that you usually end up with everything represented as strings, with no knowledge of actual types and constraints. So, you still need that documentation, even though the format is "readable without any software".

Re:What If OpenDocument Used SQLite? by enord on Thursday November 02, 2017 @05:41AM (#15608976)
It's not about human readability, it's about separating implementation from representation, so "readable without any software" is a good test for wether it's "readable with any sfotware".

If your document editor represents documents as a stack of edit-events (for undo/redo or whatever) and you document every nook and cranny of this "document format", standardize it as "binary event-sourced document format, .esd" then your binary spec will be very close to a full description of your document editor. Everyone who wants to use your format now has to reimplement your editor.

Anyone can leak implementation details into any format, and it is to some extent unavoidable, but if you can make it readable (or semi-readable), some thought has at least been put into the representation.

Re:What If OpenDocument Used SQLite? by coldtea on Thursday November 02, 2017 @07:48AM (#15609492)
>It's not about human readability, it's about separating implementation from representation

No, it's not. An sqlite-based document can have as many representations as an XML-based document -- nothing in its implementation prevents this.

>so "readable without any software" is a good test for wether it's "readable with any sfotware"

The OS, filesystem, shell, editor etc needed to read the XML file are still software.

As is the XML parser needed to do anything useful with it in the data realm.

>If your document editor represents documents as a stack of edit-events (for undo/redo or whatever) and you document every nook and cranny of this "document format", standardize it as "binary event-sourced document format, .esd" then your binary spec will be very close to a full description of your document editor. Everyone who wants to use your format now has to reimplement your editor.

You do understand that the XML file can also just be including a stack of edit-events, right?

This is totally orthogonal to the underlying storage (XML or sqlite or whatever).

Re:What If OpenDocument Used SQLite? by _pmf_ on Thursday November 02, 2017 @05:58AM (#15609038)
> so "readable without any software" is a good test for wether it's "readable with any sfotware"

What an extraordinarily stupid notion. Your filesystem is not readable without a filesystem driver for the specific binary format used to represent it, so you cannot even read your text file without having something in your stack that understands a more structured data organization scheme.

Re:What If OpenDocument Used SQLite? by chriswarbo on Thursday November 02, 2017 @06:40AM (#15609201)
> Your filesystem is not readable without a filesystem driver for the specific binary format used to represent it, so you cannot even read your text file without having something in your stack that understands a more structured data organization scheme.

This argument doesn't hold water, since file content doesn't depend on which filesystem it's on.

An archiver may choose to store data in some very particular way, like some specific tape driver. They're free to do that without corrupting the content of any files, since the files don't depend on the filesystem.

On the other hand, if an archiver chose to store, say, unzipped versions of their opendocument files, then they've corrupted the data: opendocument files are zips, unzipped data is not opendocument. The format does depend on the file content.

Re:What If OpenDocument Used SQLite? by enord on Thursday November 02, 2017 @06:14AM (#15609106)
Yes, but that comes with the operating system that comes with the computer i bought and use in the house which comes with electricity from the electrical grid in the city that lies in an aerated valley (luckily!) on the third planet from the sun. I should have added a disclaimer i guess.
Re:What If OpenDocument Used SQLite? by justinclift on Thursday November 02, 2017 @02:13PM (#15612798)
Just to point out... SQLite comes built it to pretty much every OS these days too. :)
Re:What If OpenDocument Used SQLite? by mschaef on Thursday November 02, 2017 @10:47AM (#15610858)
> Why do people believe that if something can be browsed with less/Notepad, it is somehow more "readable" than a binary representation? I've seen and worked with tons of XML, and most of it was utterly useless without accompanying documentation, just as a binary format would be.

Binary formats start out mostly unreadable by humans [1]. XML and other textual formats at least have the possibility of being made to where they can be read by laypersons.

1] I'll note that after enough immersion, I've seen people read binary core dumps, etc. but that takes much more time and practice than with XML.

Re:What If OpenDocument Used SQLite? by NMDaniel on Thursday November 02, 2017 @02:10PM (#15612754)
Some formats don't need to be read as plaintext by the average person.

Would the average person edit a .svg by hand? No, he'd use Adobe Illustrator or anything else.

Would he edit a .docx file by treating it as a zip archive and edit content.xml? No, he'd use MS Word/LibreOffice Writer...

Suppose Sqlite used XML/JSON instead of binary files, would you modify them with notepad? No, you'd probably use a SQLite browser software.(Or an application that is more tailored to the domain)

Re:What If OpenDocument Used SQLite? by mschaef on Thursday November 02, 2017 @03:28PM (#15613471)
> Some formats don't need to be read as plaintext by the average person.

Fair point, and in fact, I'd go further - most of the time most people, do not need to directly edit or view most files in most formats. Even if you took 'most' to mean 99% or higher, I'd be comfortable with that statement.

Where I differ is that I think the essence of the argument is really whether or not a binary file format offers enough value to be worth entirely eliminating the direct edit/view possibility for everybody all the time. Even if it's not a common case, it can be game-changingly useful when you need it.

Just to illustrate, you give three examples, and I have counter examples for each:

> Would the average person edit a .svg by hand? No, he'd use Adobe Illustrator or anything else.

I've modified bounding boxes by directly editing SVG, as well as read SVG directly to analyze some plots a library was generating for me.

> Would he edit a .docx file by treating it as a zip archive and edit content.xml? No, he'd use MS Word/LibreOffice Writer...

I've done this recently to extract out embedded documents on OSX (where the native versions of Office do not directly support this.)

> Suppose Sqlite used XML/JSON instead of binary files, would you modify them with notepad?

HSQLDB can use text based SQL scripts to store data, and I've modified and edited them directly for several reasons.

Re:What If OpenDocument Used SQLite? by mseebach on Thursday November 02, 2017 @04:57AM (#15608821)
Well, yes, this applies to reasonably well-designed, expressive XML (which OpenDocument is). You can definitely write XML that is perfectly incomprehensible without extensive references.
Re:What If OpenDocument Used SQLite? by agumonkey on Thursday November 02, 2017 @06:16AM (#15609111)
XML is potentially readable, but it's always possible to make the semantics so twisted it's as bad as a binary encoding. A binary encoding is obfuscated by nature.

I despise xml quite a bit but I have to admit, it's still potentially better.

Re:What If OpenDocument Used SQLite? by mavhc on Thursday November 02, 2017 @05:45AM (#15608990)
It's not readable without any software anyway, you need a text editor. If my editor has a binary file viewer, does that count?

What if my text editor has an sqlite file viewer?

Re:What If OpenDocument Used SQLite? by majewsky on Thursday November 02, 2017 @04:40AM (#15608748)
> They could be readable without any software at all.

They aren't, though. Or can you read ZIP archives without an unpacker?

Re:What If OpenDocument Used SQLite? by Drakim on Thursday November 02, 2017 @04:52AM (#15608795)
To be fair, you can't read any files without software, you need a text editor even for plaintext.

However, all software is not equal. Any OS comes with a text editor and a ZIP utility by default now. The same is not true for SQLite's format.

Re:What If OpenDocument Used SQLite? by TuringTest on Thursday November 02, 2017 @07:41AM (#15609454)
But it could easily become true if SQLite was a common document format. Back in the 90's and early 2000's, OS didn't come with a ZIP utility either.
Re:What If OpenDocument Used SQLite? by justinclift on Thursday November 02, 2017 @02:17PM (#15612835)
Which OS doesn't come with SQLite?

• Win 10 apparently does (I don't use it, so can't personally verify). Win7/8 don't.

• Every version of OSX for many years does

• Fairly sure the main Linux distro's do

• FreeBSD does, not sure about NetBSD/DragonFlyBSD though.

Checking a local OpenBSD 6.x box just now, sqlite/sqlite3 aren't in the default user path, so maybe that's one that doesn't.

Re:What If OpenDocument Used SQLite? by MrQuincle on Thursday November 02, 2017 @07:21AM (#15609365)
I don't think that's true. Does Ubuntu come with zip by default now?

Normally tar balls are used and zip has to installed afterwards:

apt install zip

I read the article as advocating for more open binary formats. That it is useful to have binary formats is logical. That someone would like to have open ones is I think a nice thought.

Re:What If OpenDocument Used SQLite? by yellowapple on Thursday November 02, 2017 @02:35PM (#15613019)
"Any OS comes with a text editor and a ZIP utility by default now."

The same thing is becoming true of SQLite (and pretty much is true if you exclude older versions of Windows). We're talking about one of the two (estimated) most-widely-deployed software projects in the world today (http://sqlite.org/mostdeployed.html). It's FOSS, ubiquitous, easily embeddable, works remarkably well, and has bindings for pretty much every programming language under the sun. As far as a general-purpose file format goes, a SQLite database is thus pretty close to ideal.

Re:What If OpenDocument Used SQLite? by pyre on Thursday November 02, 2017 @12:26PM (#15611843)
> The same is not true for SQLite's format.

That's not entirely true. Anything that comes with Python installed has SQLite bundled/compiled in. It's just the library, not the cli, but still.

Re:What If OpenDocument Used SQLite? by aeorgnoieang on Thursday November 02, 2017 @11:05AM (#15611049)
Arguably, any OS should come with SQLite too. It's pretty close to being as standard as text (which can be complicated too sometimes).
Re:What If OpenDocument Used SQLite? by geezerjay on Thursday November 02, 2017 @04:48AM (#15608775)
Actually, iirc the OpenDocument format also includes an uncompressed, human readable, pure XML format.
Re:What If OpenDocument Used SQLite? by _pmf_ on Thursday November 02, 2017 @05:59AM (#15609041)
> Actually, iirc the OpenDocument format also includes an uncompressed, human readable, pure XML format.

For some values of "readable" and "human".

Re:What If OpenDocument Used SQLite? by mkesper on Thursday November 02, 2017 @05:45AM (#15608993)
It's the 'flat' versions (fods etc.). Diff can be used on them.
Re:What If OpenDocument Used SQLite? by masklinn on Thursday November 02, 2017 @04:51AM (#15608790)
Writing a zip unpacker — including deflate decompressor — can be wrapped up in half a day by an average developer.
Re:What If OpenDocument Used SQLite? by wruza on Thursday November 02, 2017 @05:12AM (#15608875)
It sounds like good nuclear war proof solution. Maybe it is better to encode documents in Morse, because average radio man could transmit it via key in half a week.
Re:What If OpenDocument Used SQLite? by masklinn on Thursday November 02, 2017 @07:05AM (#15609299)
> It sounds like good nuclear war proof solution.

It fits the requirements of reading the file without (external) software since you can trivially reimplement it, and is also a much lower threshold than "you need to reimplement sqlite", which is why pretty much every system out there comes bundled with a zipfile unpacker.

Re:What If OpenDocument Used SQLite? by koonsolo on Thursday November 02, 2017 @05:08AM (#15608865)
First of all, notepad is software. And second, xml is totally useless without software.

But you do have a point that in a rare case, you could get your hands on the raw data which makes text easier.

But everything is a tradeoff, and the question really is if the tradeoff in this case is worth it, since sqlite is so open and portable.

Re:What If OpenDocument Used SQLite? by chii on Thursday November 02, 2017 @04:01AM (#15608618)
But you could also open the sqlite fine format using an sqlite client.

The only difference is that xml is also human "readable". But most xml isn't really readable without a tool anyway.

Re:What If OpenDocument Used SQLite? by mseebach on Thursday November 02, 2017 @04:16AM (#15608671)
Yes, and that only difference is important, and it makes XML more open than SQLite. Perhaps not enough to matter (depending on your needs), but it is more open.

You may not want to look at XML without a tool, but you could. Or, most likely, you could build a tool to look at the XML. This is a crucial design consideration of XML - even if all XML tooling, open or not, is lost forever, you can still read the XML. Not so with SQLite.

Especially for a document format, this point seems important. That said, OpenDocument is zipped, which, while a simpler and even more ubiquitous format, is still a binary format that requires a library to read, so that detracts somewhat from the point. It's difficult to imagine a future where zip libraries survive but SQLite libraries don't.

Re:What If OpenDocument Used SQLite? by jl6 on Thursday November 02, 2017 @04:58AM (#15608827)
Strictly speaking you can’t read XML without software either. Even a simple text editor is software of course, but you’ll also find XML files in arbitrary character encodings, and you absolutely do need non-trivial software to parse and display “plain” text in UTF-8.
Re:What If OpenDocument Used SQLite? by mseebach on Thursday November 02, 2017 @05:16AM (#15608885)
You don't need a text editor, you just need to be able to read a sequence of bytes. XML anchors at the almost lowest possible point: you have the stream of characters. It's a pointless exercise to consider a format except on the premise that you have access to data in some way, and sequence of bytes is the simplest possible abstraction of data, a sequence of characters the second simplest.

ASCII encoded text is simpler than UTF-8, but there is content that can't be represented in ASCII. Zip comes a bit up the food chain from there, and SQLite comes quite a bit further.

XML is about being meaningful without tooling at the lowest possible level. Any added required tooling or documentation by definition makes the data less 'open'.

Re:What If OpenDocument Used SQLite? by Santosh83 on Thursday November 02, 2017 @09:38AM (#15610266)
In the event of catastrophic loss of human knowledge to the scale that it makes it difficult or impossible to recreate a ZIP or SQLite driver, I would presume that maintaining the replacing the hardware on which XML/text files are stored would be an even bigger problem. Catastrophic collapse of civilization IMO would pretty much doom all our digital knowledge. Only books can survive such an event.
Re:What If OpenDocument Used SQLite? by mseebach on Thursday November 02, 2017 @11:38AM (#15611361)
You don't need a catastrophic loss of human knowledge for this to be a problem. Running a piece of software written in the 80s, even with the source code available, can be quite a challenge. Support for some features of the current SQLite format might deprecated, then removed, over the next many versions. Or perhaps a subtle bug is introduced that renders certain ancient versions unreadable (https://news.ycombinator.com/item?id=15531489) and sticks around for long enough that you end up in a situation where you need to invest very significantly in software archaeology.
Re:What If OpenDocument Used SQLite? by pyre on Thursday November 02, 2017 @12:29PM (#15611884)
> Support for some features of the current SQLite format might deprecated, then removed, over the next many versions. Or perhaps a subtle bug is introduced that renders certain ancient versions unreadable (https://news.ycombinator.com/item?id=15531489) and sticks around for long enough that you end up in a situation where you need to invest very significantly in software archaeology.

At this point, you've side-tracked into an argument that anyone could make against any software.

Re:What If OpenDocument Used SQLite? by mseebach on Thursday November 02, 2017 @01:44PM (#15612517)
Bingo. Which is why it's a quality not to have dependencies on any specific software when designing a format for longevity. XML has an absolute minimum of such dependencies, Open Document has only zip added to the mix, which is a format with tons of different and independent implementations, plenty of documentation for how to implement it - on top of being a fairly simple format to begin with.

SQLite for all it's significant qualities are none of that, and thus you shouldn't use it if designing for file format longevity.

Re:What If OpenDocument Used SQLite? by coldtea on Thursday November 02, 2017 @07:45AM (#15609473)
>Yes, actually they could. They could be readable without any software at all. Like XML.

You can't read XML without software.

Perhaps you take editors and cat and less as a given.

In which case, nothing prevents you from taking sqlite the binary (or 1000 serializers that can be produced very easily) as a given too.

Re:What If OpenDocument Used SQLite? by Chris2048 on Thursday November 02, 2017 @08:27AM (#15609742)
> extending the XML format

XML is only trivially "readable without any software at all". The same is true of any binary format - the issue is that it can be read, but not easily processed - which is also the case for XML (you need to integrate an XML parser for that).

And if you are including XML libs, why not SQlite libs?

Re:What If OpenDocument Used SQLite? by geezerjay on Thursday November 02, 2017 @02:30PM (#15612973)
The same is not true for any binary file. A hexdump of a plain text file is not as readable as opening the same plain text file with any basic text editor such as any notepad clone. That's the whole point: no one needs to install any software, let alone a specialized client, to read any human-readable format.

More to the point, no one needs to install a full blown database engine to read a plain text document.

You may argue that specialized tools make the job easier, but you also need to acknowledge that requiring specialized tools just to open a text file is silly.

Re:What If OpenDocument Used SQLite? by fian on Thursday November 02, 2017 @11:06AM (#15611054)
A printout of XML contains the data in a structured and understandable format.

A printout of a binary dump does not provide any clues as to how the data was structured.

Re:What If OpenDocument Used SQLite? by Chris2048 on Thursday November 02, 2017 @11:53AM (#15611483)
This is useful if you only need to read the data. If you need to process it in large amounts, its not so useful. And what if you need to traverse graph-like data in an XML format?

> a binary dump does not provide any clues as to how the data was structured

True, but if that binary format is SQlite, the structure is fully documented. You could work it out mentally just as you could work out any given XML schema.

Re:What If OpenDocument Used SQLite? by PeachPlum on Thursday November 02, 2017 @11:15AM (#15611149)
XML is UTF-8

you already need a decoder

http://www.utf8-chartable.de/

Re:What If OpenDocument Used SQLite? by lloeki on Thursday November 02, 2017 @01:40PM (#15612471)
doc and xls were even worse than proprietary binary formats: they were raw memory dumps of unserialized internal data structures. This meant implementing a doc opener was basically the tantalizing task of implementing Word-the-engine itself.
Re:What If OpenDocument Used SQLite? by josteink on Thursday November 02, 2017 @07:36AM (#15609431)
> I don't see how your comment is responsive to the excellent article. doc and xls were proprietary binary formats.

Indeed. He probably meant docx and xlsx.

Re:What If OpenDocument Used SQLite? by mnw21cam on Thursday November 02, 2017 @08:18AM (#15609668)
No, the point was that the doc and xls file formats were in themselves mini-filesystems, much like an SQLite file, and could support many of the same operations as described in the article. It however made them insanely complex to interpret.

When the docx and xlsx formats were developed, they lost this capability.

Re:What If OpenDocument Used SQLite? by sitkack on Thursday November 02, 2017 @03:37AM (#15608534)
Using SQLite as a container is different from using the whole of SQLite the embedded sql database. You can use the container by reimplementing a reader for the file format. Maybe it would make the parent feel more comfortable if the sqlite db was inside a nice cozy zip (or jar file).