当前位置:网站首页>Mysql相关术语
Mysql相关术语
2022-07-06 13:37:00 【handsome-bit】
数据库
按照数据结构来组织、存储和管理数据的仓库;是一个长期存储在计算机内的、有组织的、可共享
的、统一管理的大量数据的集合;
OLTP
OLTP(on-line transaction processing)翻译为联机事务处理;主要数据库增删改查;
OLTP主要用来记录某类业务事件的发生;数据会以增删改的方式在数据库中进行数据的更新处理
操作,要求实时性高、稳定性强、确保数据及时更新成功;
OLAP
OLAP(On-Line Analytical Processing)翻译为联机分析处理;主要对数据库查询;
当数据积累到一定的程度,我们需要对过去发生的事情做一个总结分析时,就需要把过去一段时间
内产生的数据拿出来进行统计分析,从中获取我们想要的信息,为公司做决策提供支持,这时候就
是在做OLAP了;
SQL
定义
结构化查询语言(Structured Query Language)简称SQL,是一种特殊目的的编程语言,是一种数
据库查询和程序设计语言,用于存取数据以及查询、更新和管理关系数据库系统。SQL是关系数据
库系统的标准语言。
关系型数据库包括:MySQL, SQL Server, Oracle, Sybase, postgreSQL 以及 MS Access等;
SQL命令包括:DQL、DML、DDL、DCL以及TCL;
DQL
Data Query Language - 数据查询语言;
select :从一个或者多个表中检索特定的记录;
DML
Data Manipulate Language - 数据操作语言;
insert :插入记录;
update :更新记录;
delete :删除记录;
DDL
Data Define Languge - 数据定义语言;
create :创建一个新的表、表的视图、或者在数据库中的对象;
alter :修改现有的数据库对象,例如修改表的属性或者字段;
drop :删除表、数据库对象或者视图;
DCL
Data Control Language - 数据控制语言;
grant :授予用户权限;
revoke :收回用户权限;
TCL
Transaction Control Language - 事务控制语言;
commit :事务提交;
rollback :事务回滚;
数据库术语
数据库:数据库是一些关联表的集合;
数据表:表是数据的矩阵;
列:一列包含相同类型的数据;
行:或者称为记录是一组相关的数据;
主键:主键是唯一的;一个数据表只能包含一个主键;
外键:外键用来关联两个表,来保证参照完整性;MyISAM存储引擎本身并不支持外键,只起到注
释作用;而innodb完整支持外键;
复合键:或称组合键;将多个列作为一个索引键;
索引:用于快速访问数据表的数据;索引是对表中的一列或者多列的值进行排序的一种结构;
create table parent (
id int not null,
primary key(id)
) engine=innodb;
create table child (
id int,
parent_id int,
foreign key(parent_id) references parent(id) ON DELETE CASCADE ON UPDATE
CASCADE
) engine=innodb;
– 被引用的表为父表,引用的表称为子表;
– 外键定义时,可以设置行为 ON DELETE 和 ON UPDATE,行为发生时的操作可选择:
– CASCADE 子表做同样的行为
– SET NULL 更新子表相应字段为 NULL
– NO ACTION 父类做相应行为报
边栏推荐
- 50 commonly used numpy function explanations, parameters and usage examples
- Hill | insert sort
- Divide candy
- Fzu 1686 dragon mystery repeated coverage
- Leetcode topic [array] -118 Yang Hui triangle
- b站视频链接快速获取
- Microsoft technology empowerment position - February course Preview
- JS method to stop foreach
- 3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
- Sql: stored procedures and triggers - Notes
猜你喜欢
Shake Sound poussera l'application indépendante de plantation d'herbe "louable", les octets ne peuvent pas oublier le petit livre rouge?
[Digital IC manual tearing code] Verilog automatic beverage machine | topic | principle | design | simulation
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
[interpretation of the paper] machine learning technology for Cataract Classification / classification
Efficiency tool +wps check box shows the solution to the sun problem
Checkpoint of RDD in spark
Yuan Xiaolin: safety is not only a standard, but also Volvo's unchanging belief and pursuit
Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces
Sparkshuffle process and Mr shuffle process
麦趣尔砸了小众奶招牌
随机推荐
The role of applicationmaster in spark on Yan's cluster mode
What is the RDD operator in spark
JS traversal array and string
Michael smashed the minority milk sign
20 large visual screens that are highly praised by the boss, with source code templates!
Absolute primes (C language)
R3live notes: image processing section
The underlying implementation of string
JS operation DOM element (I) -- six ways to obtain DOM nodes
[Chongqing Guangdong education] Information Literacy of Sichuan Normal University: a new engine for efficiency improvement and lifelong learning reference materials
The golden age of the U.S. technology industry has ended, and there have been constant lamentations about chip sales and 30000 layoffs
Reset Mikrotik Routeros using netinstall
Redistemplate common collection instructions opsforzset (VI)
Replace Internet TV set-top box application through digital TV and broadband network
Reptile practice (V): climbing watercress top250
Quick access to video links at station B
MPLS experiment
Why is the cluster mode of spark on Yan better than the client mode
首批入选!腾讯安全天御风控获信通院业务安全能力认证
Fzu 1686 dragon mystery repeated coverage