Direct learning: https://edu.csdn.net/course/play/27328/370726
# 1, what is NoSQL?
NoSQL is short for not only sql, which means more than SQL;
NoSQL refers to non-relational database.
# 2, the classification of
NoSQL database NoSQL database database can be roughly divided into four categories: key value storage, column storage, document storage and graphic storage.
# 3, mysql document storage:
When mysql is used as a document storage, the collection is a container, and the collection contains JSON documents that can be added, found, updated, and deleted.
# 4. The sample code is as follows:
mysqlsh root@localhost:33060/mylb
root
db
db.getCollections()
db.createCollection("employee_ds")
db.getCollections()
db.employee_ds.add({
"id":1,
"name":"张三",
"sex":"男",
"salary":5500,
"dept":"部门A"
})
db.employee_ds.add({
"id":1,
"name":"李四",
"sex":"男",
"salary":5500,
"dept":"部门A"
})
db.employee_ds.find()
db.employee_ds.find("name"="张三")
db.employee_ds.remove("name"="张三")
db.employee_ds.remove("true")
db.employee_ds.find()
db.dropCollection("employee_ds")