Pouchdb 简明教程

PouchDB Tutorial

PouchDB 是一个使用 JavaScript 编写的开放源 in-browser database API 。它是仿照 CouchDB − 一个为 npm 提供支持的 NoSQL 数据库。使用此 API,我们可以构建离线和在线两种方式工作的应用程序。PouchDB 内部使用 WebSQL 和 IndexedDB 来存储数据。

PouchDB is an open source in-browser database API written in JavaScript. It is modelled after CouchDB − a NoSQL database that powers npm. Using this API, we can build applications that work offline and online. PouchDB uses WebSQL and IndexedDB internally to store the data.

本教程讨论了 PouchDB 的基础知识,并提供了相关示例,以便于理解。

This tutorial discusses the basics of PouchDB along with relevant examples for easy understanding.

Audience

本教程是为初学者准备的,帮助他们理解 PouchDB 的基本概念。它将帮助您使用 PouchDB 和 CouchDB 构建同时支持离线和在线工作的应用程序。

This tutorial has been prepared for beginners to help them understand the basic concepts of PouchDB. It will aid you to build applications which will work offline and online alike using PouchDB and CouchDB.

Prerequisites

读者应该具备数据库的基本知识。最好对与 node.js 兼容的编程语言(如 JavaScript 和 CoffeeScript)有很好的掌握。

The reader should have a basic knowledge of databases. It would be better to have a good command on programming languages, which are compatible with node.js such as JavaScript and CoffeeScript.

Frequently Asked Questions about PouchDB

对于 PouchDB 有一些非常常见的常见问题 (FAQ),本节尝试简要回答这些问题。

There are some very Frequently Asked Questions(FAQ) about PouchDB, this section tries to answer them briefly.