Getting Started with LevelDB
- Length: 130 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2013-11-18
- ISBN-10: 1783281014
- ISBN-13: 9781783281015
- Sales Rank: #8195613 (See Top 100 Books)
Store and retrieve key-value based data quickly on iOS and OS X using LevelDB
Overview
- Understand how a sorted key-value store like LevelDB can support any app.
- Learn to use LevelDB from simple C++ code on iOS and OS/X
- Use LevelDB as a support for any OS/X, iPhone, or iPad app through a series of practical examples
In Detail
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.
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.
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.
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.
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.
What you will learn from this book
- Install LevelDB and program in C++ or Objective-C to build OS/X, iPhone, and iPad apps
- Extend simple sorted key-value stores to support graph and relational data styles
- Understand iOS interface building for an app that uses databases
- Learn the GUI patterns needed for a database-backed app
- Explore debugging features by adding an embedded web server to your iOS app
- Install additional libraries and see how to use LevelDB from JavaScript via Node as well as Ruby and Python
- Compare SQL to LevelDB including SQL-like relational schemas and learn the implementation obligations to maintain database integrity
Approach
The book is a concise guide for using LevelDB. It explains database concepts and the use of C++, ranging from the basics all the way to high level topics in an easy to follow, step-by-step format.
Who this book is written for
The book is meant for developers who want an embedded database for their applications. Experienced programmers can pick up on the sophisticated data mapping patterns and tuning tips.
Getting Started with LevelDB requires a minimal background in programming in C++ or Objective-C for OS/X or iOS and familiarity with XCode. Therefore it teaches enough C++ to use LevelDB without presuming any C++ knowledge, so is suitable for beginner Objective-C programmers.
Table of Contents
Chapter 1: Downloading LevelDB and Building with OS X
Chapter 2: Installing LevelDB and Building for iOS
Chapter 3: Basic Key-Value Operations – Creating and Deleting Data
Chapter 4: Iteration and Searching Keys
Chapter 5: Using Objective-C
Chapter 6: Integrating with a Cocoa UI
Chapter 7: Debugging with REPLs and Command Lines
Chapter 8: Richer Keys and Data Structures
Chapter 9: A Document Database
Chapter 10: Tuning and Key Policies
Appendix: Scripting Languages