separate journal dTable and overlay dTable for each transac-
tion, and having more than one such transaction at a time, the
different transactions would automatically be isolated from
each other’s changes. Independent transactions could be as-
signed IDs on request or automatically. Committing one of
the transactions could either roll its changes into the official
journal dTable immediately, making those changes visible to
other transactions, or append its journal dTable to the offi-
cial list and merge the changes once no other transactions
require a view of the data before the commit. The major
challenges in implementing this proposal would seem to be
shared with any system with concurrent transactions, namely
detecting conflicts and adding locks. Unfortunately, some
concurrency disciplines seem perhaps difficult to add as sep-
arate modules; for example, every storage dTable might re-
quire changes to support fine-grained record locking.
8 CONCLUSION
Anvil builds structured data stores by composing the de-
sired functionality from sets of simple dTable modules. Sim-
ple configuration changes can substantially alter how Anvil
stores data, and when unique storage strategies are needed,
it is easy to write new dTables. While Anvil still lacks some
important features, they do not appear to be fundamentally
precluded by our design.
The overhead incurred by Anvil’s modularity, while not
completely negligible, is small in comparison to the perfor-
mance benefits it can offer, both due to its use of separate
write-optimized and read-only dTables and to the ability to
use specialized dTables for efficient data storage. Our proto-
type implementation of Anvil is faster than SQLite’s original
back end based on B-trees when running the TPC-C bench-
mark with DBT2, showing that its performance is reasonable
for realistic workloads. Further, we can easily customize it
as a column store for a benchmark loosely based on TPC-
H, showing that optimizing it for specific data is both simple
and effective.
ACKNOWLEDGMENTS
We would like to thank the members of our lab, TERTL, for
sitting through several meetings at which ideas much less in-
teresting than those in this paper were discussed at length.
In particular, we would like to thank Petros Efstathopou-
los, whose comments on early versions of this paper inspired
several useful major changes, and Steve VanDeBogart, who
modified DBT2 to work with SQLite (allowing us to run
TPC-C). We would also like to thank the anonymous review-
ers and our shepherd, David Andersen, for the time they ded-
icated to providing valuable feedback on drafts of this paper.
Our work was supported by the National Science Foundation
under Grant Nos. 0546892 and 0427202; by a Microsoft Re-
search New Faculty Fellowship; by a Sloan Research Fellow-
ship; and by an equipment grant from Intel. Any opinions,
findings, and conclusions or recommendations expressed in
this material are those of the authors and do not necessarily
reflect the views of the National Science Foundation. Finally,
we would like to thank our lab turtles, Vi and Emacs, for be-
ing turtles in a lab whose acronym is homophonic with the
name of their species, and for never having complained about
their names.
Toilet
Paper
REFERENCES
[1] Daniel Abadi, Samuel Madden, and Miguel Ferreira. Integrating com-
pression and execution in column-oriented database systems. In Proc.
SIGMOD ’06, pages 671–682, 2006.
[2] Don Steve Batory, J. R. Barnett, Jorge F. Garza, Kenneth Paul Smith,
K. Tsukuda, C. Twichell, and T. E. Wise. GENESIS: an extensible
database management system. IEEE Transactions on Software Engi-
neering, 14(11):1711–1730, 1988.
[3] Rudolf Bayer and Edward M. McCreight. Organization and mainte-
nance of large ordered indices. In SIGFIDET Workshop, pages 107–
141, July 1970.
[4] Burton H. Bloom. Space/time trade-offs in hash coding with allowable
errors. Communications of the ACM, 13(7):422–426, 1970.
[5] Peter Alexander Boncz. Monet: A Next-Generation DBMS Kernel For
Query-Intensive Applications. PhD thesis, Universiteit van Amster-
dam, Amsterdam, The Netherlands, May 2002.
[6] CDB Constant DataBase. http://cr.yp.to/cdb.html.
[7] Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deb-
orah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, and
Robert E. Gruber. Bigtable: a distributed storage system for structured
data. In Proc. OSDI ’06, pages 205–218, November 2006.
[8] DBT2. http://sf.net/projects/osdldbt/.
[9] Christopher Frost, Mike Mammarella, Eddie Kohler, Andrew de los
Reyes, Shant Hovsepian, Andrew Matsuoka, and Lei Zhang. Gener-
alized file system dependencies. In Proc. SOSP ’07, pages 307–320,
2007.
[10] Stavros Harizopoulos, Daniel J. Abadi, Samuel Madden, and Michael
Stonebraker. OLTP through the looking glass, and what we found
there. In Proc. SIGMOD ’08, pages 981–992, 2008.
[11] Stavros Harizopoulos, Velen Liang, Daniel J. Abadi, and Samuel Mad-
den. Performance tradeoffs in read-optimized databases. In Proc.
VLDB ’06, pages 487–498, 2006.
[12] Nicholas Lester, Alistair Moffat, and Justin Zobel. Efficient online
index construction for text databases. ACM Transactions on Database
Systems, 33(3):1–33, 2008.
[13] Bruce Lindsay, John McPherson, and Hamid Pirahesh. A data man-
agement extension architecture. SIGMOD Record, 16(3):220–226,
1987.
[14] David E. Lowell and Peter M. Chen. Free transactions with Rio Vista.
In Proc. SOSP ’97, pages 92–101, 1997.
[15] MySQL. http://www.mysql.com/.
[16] MySQL Internals Custom Engine. http://forge.mysql.com/
wiki/MySQL_Internals_Custom_Engine.
[17] Edmund B. Nightingale, Kaushik Veeraraghavan, Peter M. Chen, and
Jason Flinn. Rethink the sync. In Proc. OSDI ’06, pages 1–14,
November 2006.
[18] Patrick O’Neil, Edward Cheng, Dieter Gawlick, and Elizabeth
O’Neil. The log-structured merge-tree (LSM-tree). Acta Informat-
ica, 33(4):351–385, 1996.
[19] Oracle. http://www.oracle.com/.
[20] Mendel Rosenblum and John K. Ousterhout. The design and imple-
mentation of a log-structured file system. ACM Transactions on Com-
puter Systems, 10(1):1–15, 1992.
[21] Russell Sears and Eric Brewer. Stasis: flexible transactional storage.
In Proc. OSDI ’06, pages 29–44, November 2006.
[22] Russell Sears, Mark Callaghan, and Eric Brewer. Rose: Compressed,
log-structured replication. In Proc. VLDB ’08, August 2008.
[23] SQLite. http://www.sqlite.org/.
[24] Michael Stonebraker, Daniel J. Abadi, Adam Batkin, Xuedong Chen,
Mitch Cherniack, Miguel Ferreira, Edmond Lau, Amerson Lin, Sam
Madden, Elizabeth O’Neil, Pat O’Neil, Alex Rasin, Nga Tran, and
16