zoukankan      html  css  js  c++  java
  • Mongo DB-0

    前言:

    • what is MONGO?

    It is commonly used in combination with Node. Mongo is a document database, which we can use to store and retrive complex data from.

    • Why use a database instead of just saving to a file
    1. Databases can handle large amount of data efficiently and store it compactly
    2. They provide tools for easy insertion, querying, and updating of data
    3. They generally offer security features and control over access to data
    4. They (generally) scale well
    • SQL VS NOSQL
      • SQL DATABASES: Structured Query Language databases are relational databases. We pre-define a schema of tables before we insert anything.
      • NO-SQL DATAVASES: NoSQL databases do not use SQL. There are many types of no-sql database, including documents, key-value, and graph stores.
    • Popular Databases

    • why are we learning MANGO?
    1. Mongo is very commonly used with Node and Express(MEAN&MERN stacks)
    2. it's easy to get started with(through it can be tricky to truly master)
    3. It plays particularly well with JavaScript
    4. Its popularity also means there is a strong community of developers using Mongo.
    1. 在官网https://brew.sh/#install install Homebrew

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    2. brew tap mongodb/brew

    3. brew install mongodb-community@4.4

    4. brew services start mongodb-community@4.4

    1,2,3,4都在terminal运行下载安装(MacOS)

    • 在terminal输入mongo进入服务
    • 输入help查看用法
    • show dbs/ show collections/use <db_name>(如果db_name不是已经存在的话,新建一个)/db.dogs.find()
  • 相关阅读:
    文档注释
    配置环境变量
    Java编译-->运行
    DOS命令(日后补充)
    字符、字符串函数
    输入字符串,逆序输出
    求矩阵最大元素值,以及行号和列号
    Apache和Tomcat的区别
    C# params关键字
    JSP的隐式对象(session)
  • 原文地址:https://www.cnblogs.com/LilyLiya/p/14391731.html
Copyright © 2011-2022 走看看