NoSql--Mongodb简介
NoSQL (NoSQL = Not Only SQL ),意即不仅仅是SQL; 指的是非关系型的数据库。随着互联网web2.0网站的兴起,传统的关系数据库在应付web2.0网站,特别是超大规模和高并发的SNS类型的web2.0纯动态网站已经显得力不从心,暴露了很多难以克服的问题,而非关系型
NoSQL
(NoSQL = Not Only SQL ),意即“不仅仅是SQL;
指的是非关系型的数据库。随着互联网web2.0网站的兴起,传统的关系数据库在应付web2.0网站,特别是超大规模和高并发的SNS类型的web2.0纯动态网站已经显得力不从心,暴露了很多难以克服的问题,而非关系型的数据库则由于其本身的特点得到了非常迅速的发展。
为什么是NoSql
1 对数据库高并发读写的需求
2 对海量数据的高效率存储和访问需求
3 对数据库的高可扩展星和高可用性的需求
NoSql特点
它们可以处理超大量的数据。
它们运行在便宜的PC服务器集群上。
它们击碎了性能瓶颈。
没有过多的操作
Bootstrap支持
因为NoSQL项目都是开源的,因此它们缺乏供应商提供的正式支持。这一点它们与大多数开源项目一样,不得不从社区中寻求支持。
优点:
易扩展
大数据量,高性能
灵活性数据模型
NoSQL无需事先为要存储的数据建立字段,随时可以存储自定义的数据格式。而在关系数据库里,增删字段是一件非常麻烦的事情。如果是非常大数据量的表,增加字段简直就是一个噩梦。这点在大数据量的web2.0时代尤其明显。
高可用
缺点:
没有正式的官方支持。
产品层出不穷,并准不定。
以下是NoSql的一些产品截图
初始Mongodb
是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的。他支持的
数据结构非常松散,是类似json的bjson格式,因此可以存储比较复杂的数据类型.
1 面向集合
2 模式自由
意味着存储在MOngodb数据库中的文件,我们不需求知道它的任何结构定义。"无模式"是什么概念呢?例如:下面的两个记录可以存在于同一个集合里面:
{"welcome":"beijing"} {"age":25}
怎么样,是不是很像前面学习过的json数据格式呀。也是想c++中的结构体吧。
所以这个学习相同的地方还是有很多的
3 文档型
意思是我们存储的数据类型是键--值对的集合,键是字符串,值可以是数据类型集合里的任务类型,包括数组和文档,我们把这个数据格式称为“BSON”是“Binary serialized Document Notation
"
下面介绍特点和使用场合。
特点:
这里就只说上诉没有提到的
模式自由
面向集合
支持查询
使用高效的二进制数据存储
自动处理碎片
可通过网络访问
适用场合:
网站数据:Mongodb非常适用于适时的插入,更新域查询,并具备实时数据存储所需要的复制及高度伸缩性
缓存:
用于对象及json数据的存储。
以上是Nosql的基本简介。可以看到针对其中的Mongodb的操作以及数据的存储。与Js的Json是没有区别的。而Mongodb的数据操作语法极其类似与SQl。所以这就是老师说的,学习的相通行。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Object-relational mapping (ORM) frameworks play a vital role in python development, they simplify data access and management by building a bridge between object and relational databases. In order to evaluate the performance of different ORM frameworks, this article will benchmark against the following popular frameworks: sqlAlchemyPeeweeDjangoORMPonyORMTortoiseORM Test Method The benchmarking uses a SQLite database containing 1 million records. The test performed the following operations on the database: Insert: Insert 10,000 new records into the table Read: Read all records in the table Update: Update a single field for all records in the table Delete: Delete all records in the table Each operation

With the development of the Internet, big data analysis and real-time information processing have become an important need for enterprises. In order to meet such needs, traditional relational databases no longer meet the needs of business and technology development. Instead, using NoSQL databases has become an important option. In this article, we will discuss the use of SpringBoot integrated with NoSQL databases to enable the development and deployment of modern applications. What is a NoSQL database? NoSQL is notonlySQL

The Yii framework is a high-performance, highly scalable, and highly maintainable PHP development framework that is highly efficient and reliable when developing Web applications. The main advantage of the Yii framework is its unique features and development methods, while also integrating many practical tools and functions. The core concept of the Yii framework, the MVC pattern, Yii adopts the MVC (Model-View-Controller) pattern, which is a pattern that divides the application into three independent parts, namely the business logic processing model and the user interface presentation model.

Object-relational mapping (ORM) is a programming technology that allows developers to use object programming languages to manipulate databases without writing SQL queries directly. ORM tools in python (such as SQLAlchemy, Peewee, and DjangoORM) simplify database interaction for big data projects. Advantages Code Simplicity: ORM eliminates the need to write lengthy SQL queries, which improves code simplicity and readability. Data abstraction: ORM provides an abstraction layer that isolates application code from database implementation details, improving flexibility. Performance optimization: ORMs often use caching and batch operations to optimize database queries, thereby improving performance. Portability: ORM allows developers to

In modern web application development, PHP and NoSQL databases have become very popular technology choices. In the past, PHP has been widely used to develop dynamic websites and web applications, while NoSQL database is a new data storage technology that has only recently emerged, providing a more flexible and scalable solution. In this article, we will explore PHP and NoSQL databases in practical applications. PHP is a server-side programming language, originally

Understanding Java Design Patterns: An introduction to 7 commonly used design patterns, specific code examples are required. Java design patterns are a universal solution to software design problems. It provides a set of widely accepted design ideas and codes of conduct. Design patterns help us better organize and plan the code structure, making the code more maintainable, readable and scalable. In this article, we will introduce 7 commonly used design patterns in Java and provide corresponding code examples. Singleton Patte

NoSQL (NotOnlySQL) database is a type of database that has developed rapidly in recent years. Compared with traditional relational databases, it has better scalability and performance, and supports more data types and data storage methods. Among them, MongoDB is a NoSQL database that uses the document database model and is widely used in web applications, mobile applications, Internet of Things devices and other fields. This article will introduce how to use PHP to write the basic operations of MongoDB database, and demonstrate through examples how to meet

Object-relational mapping (ORM) is a technology that allows building a bridge between object-oriented programming languages and relational databases. Using pythonORM can significantly simplify data persistence operations, thereby improving application development efficiency and maintainability. Advantages Using PythonORM has the following advantages: Reduce boilerplate code: ORM automatically generates sql queries, thereby avoiding writing a lot of boilerplate code. Simplify database interaction: ORM provides a unified interface for interacting with the database, simplifying data operations. Improve security: ORM uses parameterized queries, which can prevent security vulnerabilities such as SQL injection. Promote data consistency: ORM ensures synchronization between objects and databases and maintains data consistency. Choose ORM to have
