【大数据应用之NoSql数据库】

一、NoSql概述

(一)原因mysql关系数据库模式局限

不适用云计算,云计算负载动态变化
充分考虑到云计算底层基础设置,nosql与云计算充分融合
性能缺陷:
海量数据无法有效管理
无法满足高并发需求
无法满足高扩展高可用性(主从服务器读写分流) 复杂、高延迟、扩容

(二) nosql兴起原因

Insert image description here
web2.0 不需要严格数据库事务、实时读写性、f复杂sql查询。 催生了非结构化

二、nosql与mysql比较

(一)数据原理

Insert image description here

(二)数据规模

Insert image description here

(三)数据模式

Insert image description here

(四)查询效率

Insert image description here

(五)一致性

Insert image description here

(六)数据完整性

Insert image description here
Insert image description here
Insert image description here
Insert image description here

Insert image description here

两者比较

Insert image description here

Insert image description here
Insert image description here
Insert image description here

三、Nosql四大类型

Insert image description here

(一)键值数据库

Redis, Memcached,simpleDB

Insert image description here

Insert image description here

(二)文档数据

最像关系数据库,可以自我描述。JSON
Insert image description here
没有表之间的关联,支持并发
Insert image description here
Insert image description here

(三)图数据库

Neo4j
Insert image description here

(四)列族数据库

Insert image description here

(五)类型之间之间比较

Insert image description here

NoSql 三大理论支持

Insert image description here

CAP理论
consistency 一致性
availability 可用性
partitiontolerance 分区容忍性
理论表明不可能三个兼备只能三取二
Insert image description here

Insert image description here
Insert image description here

BASEbasically Available state & Eventual consistency

基本可用,分区失败
软状态,一段时间后同步
最终一致性,弱一致性,最终一致性

Insert image description here
Insert image description here
w(write) , R(read), N(备份)
Insert image description here

五、NewSql 数据库

具体任务具体分析,应用场景不同,新型数据库

Insert image description here
Insert image description here

六 MongoDB (c++写)

(一) 简介

  1. 基于C++语言编写,分布式开源数据库
  2. 高负载增加节点,保证性能
  3. 为WEB提供可扩展高性能数据存储解决方案
  4. 类似于JSON文档,面向文档存贮

Insert image description here
Insert image description here

(三) 安装和使用MongoDB

Insert image description here
shell登录和使用
Insert image description here

编程使用JAVA访问MongoDBInsert image description here
Insert image description here

Insert image description here

新的改变

我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:

  1. 全新的界面设计 ,将会带来全新的写作体验;
  2. 在创作中心设置你喜爱的代码高亮样式,Markdown 将代码片显示选择的高亮样式 进行展示;
  3. 增加了 图片拖拽 功能,你可以将本地的图片直接拖拽到编辑区域直接展示;
  4. 全新的 KaTeX数学公式 语法;
  5. 增加了支持甘特图的mermaid语法1 功能;
  6. 增加了 多屏幕编辑 Markdown文章功能;
  7. 增加了 焦点写作模式、预览模式、简洁写作模式、左右区域同步滚轮设置 等功能,功能按钮位于编辑区域与预览区域中间;
  8. 增加了 检查列表 功能。

功能快捷键

撤销:Ctrl/Command + Z
重做:Ctrl/Command + Y
加粗:Ctrl/Command + B
斜体:Ctrl/Command + I
标题:Ctrl/Command + Shift + H
无序列表:Ctrl/Command + Shift + U
有序列表:Ctrl/Command + Shift + O
检查列表:Ctrl/Command + Shift + C
插入代码:Ctrl/Command + Shift + K
插入链接:Ctrl/Command + Shift + L
插入图片:Ctrl/Command + Shift + G
查找:Ctrl/Command + F
替换:Ctrl/Command + G

合理的创建标题,有助于目录的生成

直接输入1次#,并按下space后,将生成1级标题。
输入2次#,并按下space后,将生成2级标题。
以此类推,我们支持6级标题。有助于使用TOC语法后生成一个完美的目录。

如何改变文本的样式

强调文本 强调文本

加粗文本 加粗文本

标记文本

删除文本

引用文本

H2O is是液体。

210 运算结果是 1024.

插入链接与图片

链接: link.

图片: Everything

带尺寸的图片: Everything

居中的图片: Everything

居中并且带尺寸的图片: Everything

当然,我们为了让用户更加便捷,我们增加了图片拖拽功能。

如何插入一段漂亮的代码片

博客设置页面,选择一款你喜欢的代码片高亮样式,下面展示同样高亮的 代码片.

// An highlighted block
var foo = 'bar';

生成一个适合你的列表

  • 项目
    • 项目
      • 项目
  1. 项目1
  2. 项目2
  3. 项目3
  • 计划任务
  • 完成任务

创建一个表格

一个简单的表格是这么创建的:

项目 Value
电脑 $1600
手机 $12
导管 $1

设定内容居中、居左、居右

使用:---------:居中
使用:----------居左
使用----------:居右

第一列 第二列 第三列
第一列文本居中 第二列文本居右 第三列文本居左

SmartyPants

SmartyPants将ASCII标点字符转换为“智能”印刷标点HTML实体。例如:

TYPE ASCII HTML
Single backticks 'Isn't this fun?' ‘Isn’t this fun?’
Quotes "Isn't this fun?" “Isn’t this fun?”
Dashes -- is en-dash, --- is em-dash – is en-dash, — is em-dash

Create a custom list

Markdown
Text-to- HTML conversion tool
Authors
John
Luke

How to create a footnote

A text with footnotes. 2

Comments are also essential

Markdown general text version HTML.

KaTeX math formula

You can render LaTeX mathematical expressions using KaTeX:

Gamma公式展示 Γ ( n ) = ( n − 1 ) ! ∀ n ∈ N \Gamma(n) = (n-1)!\quad\forall n\in\mathbb N Γ(n)=(n1)!nN is through Euler integral

Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t   . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ(z)=0tz1etdt.

You can find more information aboutLaTeX Mathematical expressionshere< a i=4>.

New Gantt chart function to enrich your articles

Mon 06 Mon 13 Mon 20 已完成 进行中 计划一 计划二 现有任务 Adding GANTT diagram functionality to mermaid
  • 关于 sweet special picture Language, reference 这儿,

UML diagram

can be rendered using UML diagrams. Mermaid. For example, the following sequence diagram is generated:

张三 李四 王五 你好!李四, 最近怎么样? 你最近怎么样,王五? 我很好,谢谢! 我很好,谢谢! 李四想了很长时间, 文字太长了 不适合放在一行. 打量着王五... 很好... 王五, 你怎么样? 张三 李四 王五

This will produce a flowchart. :

链接
长方形
圆角长方形
菱形
  • 关于 Mermaid Language, Reference 这儿,

FLowchart flowchart

We will still support flowchart flow charts:

Created with Raphaël 2.3.0 开始 我的操作 确认? 结束 yes no
  • 关于 Flowchart Flowchart Procedure Guide Language, Reference 这儿.

Export and import

Export

If you want to try using this editor, you can edit any part of this article. When you finish writing an article, find Article Export in the upper toolbar and generate a .md file or .html file for local saving.

import

If you want to load a .md file you have written, you can select the import function on the upper toolbar to import the file with the corresponding extension,
to continue your creation.


  1. mermaid语法说明 ↩︎

  2. Explanation of footnotes ↩︎

Guess you like

Origin blog.csdn.net/huangdxian/article/details/121394965