当前位置:网站首页>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 父类做相应行为报
边栏推荐
- What is the RDD operator in spark
- c语言char, wchar_t, char16_t, char32_t和字符集的关系
- uni-app App端半屏连续扫码
- VIM basic configuration and frequently used commands
- Run the deep network on PI and Jetson nano, and the program is killed
- [Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
- Leveldb source code analysis series - main process
- Happy sound 2[sing.2]
- FZU 1686 龙之谜 重复覆盖
- Reinforcement learning - learning notes 5 | alphago
猜你喜欢
MPLS experiment
Efficiency tool +wps check box shows the solution to the sun problem
Huawei has launched attacks in many industries at the same time, and its frightening technology has made European and American enterprises tremble
Fastjson parses JSON strings (deserialized to list, map)
50个常用的Numpy函数解释,参数和使用示例
Sparkshuffle process and Mr shuffle process
【力扣刷题】32. 最长有效括号
Caching strategies overview
[interpretation of the paper] machine learning technology for Cataract Classification / classification
The difference between break and continue in the for loop -- break completely end the loop & continue terminate this loop
随机推荐
MySQL removes duplicates according to two fields
爬虫实战(五):爬豆瓣top250
Reinforcement learning - learning notes 5 | alphago
WEB功能测试说明
数字化转型挂帅复产复工,线上线下全融合重建商业逻辑
1D convolution detail
20 large visual screens that are highly praised by the boss, with source code templates!
JS学习笔记-OO创建怀疑的对象
Guava: three ways to create immutablexxx objects
中国白酒的5场大战
在Pi和Jetson nano上运行深度网络,程序被Killed
袁小林:安全不只是标准,更是沃尔沃不变的信仰和追求
[go][reprint]vscode run a HelloWorld example after configuring go
The use method of string is startwith () - start with XX, endswith () - end with XX, trim () - delete spaces at both ends
抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
基于InsightFace的高精度人脸识别,可直接对标虹软
Divide candy
C language: comprehensive application of if, def and ifndef
Leveldb source code analysis series - main process
强化学习-学习笔记5 | AlphaGo