1.定义
NeDB is a lightweight document DBMS written in JavaScript.
全称:Node.js Embedded Database
can be used both as embedded嵌入式(保存) and in-memory 内存式(不保存)
It is a lightweight NoSQL database.
No-SQL以json格式储存
2.Typical Operations on Stored Data: CRUD
Create--insert,Read--find,Update--update,Delete--remove
1.Create
db.insert({文档},回调函数)
2.Read
db.find({查询条件,回调函数});
3.Delete
db.remove({键值对},{},回调函数);
4.Update
db.update(query, update, options, callback);
3.Data Storage Options
Flat files,Database,Cloud Persistence
4.NoSQL Databases
Also called non-relational databases are database that don’t rely on the “relation” as the underlying data model.
They don’t use SQL as the language for interaction with the database.
Instead the data is held in 'documents’, sometime with no fixed schema.
The document format is based on key:value pairs.
Native value types are string, number, date, Boolean, null; but values can also be arrays and objects.
非关系数据库是不依赖于“关系”作为底层数据模型的数据库,不使用SQL作为与数据库交互的语言。数据保存在“文档”中,有时没有固定的模式。
文档格式基于键值对。
原生值类型是字符串,数字,日期,布尔值,null;但是值也可以是数组和对象。