添物零基础到大型全栈架构师 不花钱学计算机及编程(预备篇)— 数据库
Posted 马如林
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了添物零基础到大型全栈架构师 不花钱学计算机及编程(预备篇)— 数据库相关的知识,希望对你有一定的参考价值。
class="video_iframe" height="375" width="500" frameborder="0" src="https://v.qq.com/iframe/preview.html?vid=w0308km7oro&width=500&height=375&auto=0" allowfullscreen="" style="line-height: 25.6px; margin: 0px; padding: 0px; border-width: 0px; border-style: initial; width: 555.556px; position: static; z-index: 1; background-color: rgb(0, 0, 0);">
数据库是什么?
数据库就是存放数据的仓库。
为什么要学习数据库?
为了开发的方便,大家基本使用统一数据库进行数据的存储盒检索。
SQL是什么?
SQL(Struct Query Language)是一标准,大家用来统一数据库操作使用的。比较简单和方便使用。
数据库学习使用Windowds系统的可以用微软SQL Server进行实战,如果用Linux的话,就使用mysql吧。Oracle和DB2就是高级点而已,一般互联网公司也不用,也就是电信和银行等巨头使用。
参考视频学习网站:
1.SQL教程 (杨中科)使用微软SQL Server讲解的。
2.MySQL数据库(高洛峰)
3.尚学堂马士兵Oracle视频教程
参考图书:
学哪种数据库可以选择其对应图书,也有些图书是通用的。有点经验再买也可以,一般官方文档就是最好的学习资料了。
《Head First SQL》像看图画书一样学习SQL,Head系列都还可以。
《Teach Yourself SQL in 21 Days》是非常不错的学习教程。
《SQL必知必会(第3版)》也不错,一般多版的图书都不会差,好才会有需求。
参考学习:
SQL in 24 Hours
强烈推荐此书:《Transact-SQL权威指南》
SQL必知必会也可以
如何衡量学习效果?
Oracle是可以考证的,其他的我不知道。
必须掌握和了解的基本概念(包括单不限于)
DataBase/DB/表/行/列/视图/字段/字段类型/数据长度/SQL/存储过程/ACID/触发器/连接查询/左连接/右连接/内连接/外连接/管理系统/用户/用户权限/数据库系统管理员/备份/恢复/日志/查询分析等
Edgar F. Codd 12 rules
Rule 0: The Foundation rule:
For any system that is advertised as, or claimed to be, a relational data base management system, that system must be able to manage data bases entirely through its relational capabilities.
Rule 1: The information rule:
All information in a relational data base is represented explicitly at the logical level and in exactly one way — by values in tables.
Rule 2: The guaranteed access rule:
Each and every data (atomic value) in a relational data base is guaranteed to be logically accessible by resorting to a combination of table name, primary key value and column name.
Rule 3: Systematic treatment of null values:
Null values (distinct from the empty character string or a string of blank characters and distinct from zero or any other number) are supported in fully relational DBMS for representing missing information and inapplicable information in a systematic way, independent of data type.
Rule 4: Dynamic online catalog based on the relational model:
The data base description is represented at the logical level in the same way as ordinary data, so that authorized users can apply the same relational language to its interrogation as they apply to the regular data.
Rule 5: The comprehensive data sublanguage rule:
A relational system may support several languages and various modes of terminal use (for example, the fill-in-the-blanks mode). However, there must be at least one language whose statements are expressible, per some well-defined syntax, as character strings and that is comprehensive in supporting
all of the following items:
1.Data definition.
2.View definition.
3.Data manipulation (interactive and by program).
4.Integrity constraints.
5.Authorization.
6.Transaction boundaries (begin, commit and rollback).
Rule 6: The view updating rule:
All views that are theoretically updatable are also updatable by the system.
Rule 7: High-level insert, update, and delete:
The capability of handling a base relation or a derived relation as a single operand applies not only to the retrieval of data but also to the insertion, update and deletion of data.
Rule 8: Physical data independence:
Application programs and terminal activities remain logically unimpaired whenever any changes are made in either storage representations or access methods.
Rule 9: Logical data independence:
Application programs and terminal activities remain logically unimpaired when information-preserving changes of any kind that theoretically permit unimpairment are made to the base tables.
Rule 10: Integrity independence:
Integrity constraints specific to a particular relational data base must be definable in the relational data sublanguage and storable in the catalog, not in the application programs.
Rule 11: Distribution independence:
A relational DBMS has distribution independence.
Rule 12: The nonsubversion rule:
If a relational system has a low-level (single-record-at-a-time) language, that low level cannot be used to subvert or bypass the integrity rules and constraints expressed in the higher level relational language (multiple-records-at-a-time).
CAP理论(分布式系统)
又称CAP定理,指的是在一个分布式系统中, Consistency(一致性)、 Availability(可用性)、Partition tolerance(分区容错性),三者不可得兼。
分布式系统的CAP理论:理论首先把分布式系统中的三个特性进行了如下归纳:
一致性(C):在分布式系统中的所有数据备份,在同一时刻是否同样的值。(等同于所有节点访问同一份最新的数据副本)
可用性(A):在集群中一部分节点故障后,集群整体是否还能响应客户端的读写请求。(对数据更新具备高可用性)
分区容错性(P):以实际效果而言,分区相当于对通信的时限要求。系统如果不能在时限内达成数据一致性,就意味着发生了分区的情况,必须就当前操作在C和A之间做出选择。
再介绍几个高级内容
数据仓库
简单讲就是存放数据的仓库,形象点就是大的数据库。
数据分析
SQL基础必备。
数据挖掘
一般也有SQL的使用。
NOSQL
MongoDB
云
Hadoop,Cassandra,HBase等
添物零基础到大型全栈架构师 不花钱学计算机及编程(预备篇)- 计算机基础
添物零基础到大型全栈架构师 不花钱学计算机及编程(预备篇)- 概述
添物零基础到大型全栈架构师 不花钱学计算机及编程(预备篇)— 数据库
添物零基础到大型全栈架构师 不花钱学计算机及编程(预备篇)— C语言编程基础