Chapter 9. HTML Storage Engine—Reads and Writes
In the previous chapter, we created a simple read-only MySQL storage engine. Now, we will consider a more complex example, a complete read-write storage engine, but with no support for indexes. Let's say, it will be an "html" engine—an engine that stores tables in HTML files. Such a file can be later loaded in a web browser and the table will be shown as an HTML table.
An idea of the HTML engine
Ever thought about what your tables might look like? Why not represent a table as a<TABLE>?
You would be able to see it, visually, in any browser. Sounds cool. But how could we make it work?
We want a simple engine, not an all-purpose Swiss Army Knife HTML-to-SQL converter, which means we will not need any existing universal HTML or XML parsers, but can rely on a fixed file format. For example, something like this:
<html><head><title>t1</title></head><body><table border=1> <tr><th>col1</th...