Book Image

Getting Started with LevelDB

By : Andy Dent
Book Image

Getting Started with LevelDB

By: Andy Dent

Overview of this book

<p>Mobile and standalone desktop apps often need to store and rapidly retrieve data. LevelDB scales from a few simple values up to trillions of records and is flexible enough to store any kind of data.<br /><br />Getting Started with LevelDB progresses through the sophisticated ways to use databases. It starts by explaining how to install and build LevelDB from the basics, and moves on to explain the different Objective-C layers for LevelDB. It can be used as an introduction to database-backed iOS apps, as well as provides clarification to key-value stores and helps you understand how they relate to SQL.<br /><br />LevelDB is a flexible data solution that uses key-value stores to allow for the development of highly complex, efficient data storage systems. From the basics of data storage and retrieval to complex cases involving data storage for apps, this book covers a wide range of LevelDB topics<br /><br />Even relatively simple apps may have the need to search their data using different terms. Getting Started with LevelDB shows how to design keys to retrieve and store data efficiently. You will learn how its “levelled” nature delivers speedy writes and how to tune its settings and design for performance. You will also see a few techniques for debugging and tuning.</p> <p><br />Getting Started with LevelDB will leave you as an accomplished LevelDB programmer, confident you can build a complex database-backed app with high performance on iOS or OS/X.</p>
Table of Contents (18 chapters)
Getting Started with LevelDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Downloading LevelDB and Building with OS X
Index

Chapter 9. A Document Database

This chapter is going to take some of the theory we just discussed in the previous chapters and show the use of richer record structures and multiple keys for a document database. It uses the extended APLevelDBSS framework for these searches and building keys, including a word index.

This is a fairly simple document database but would be enough to keep track of a range of books and publications as well as local PDF or other files. The process of building lists of each and entering their details is very similar to what we covered in the Sample06 GUI used in the previous chapter. One GUI technique for OS X that is new to this application is how to get references to files by dragging and dropping them on our window, so the details behind that are discussed in this chapter.

The samples so far haven't covered how to handle more than one database. We used fixed paths to a known database location. Opening others is covered here including discussing the package idiom...