当前位置:网站首页>SQL basics 1
SQL basics 1
2022-07-16 06:50:00 【2021 Nqq】
List of articles
SQL First time to know - database 、SQL And data table
Row and primary key
The columns in the table are used to store certain types of information , For example, customer information table , You need to create multiple columns to save multiple attributes , Used to record data . As for the details of each customer , Will take That's ok Is written to the table .
The primary key value is a unique identifier for each row . To ensure that each row can be assigned its own primary key value , Primary key column No null values are allowed , Duplicate values are not allowed .
For the data in the table , The primary key is the only location and record , Other tables may also need to reference the primary key column of this table . therefore , Primary key Modification and deletion are not allowed , Otherwise, references and queries will become invalid .
Because of this , We do not recommend using business-related columns as primary keys , Such as mobile phone number , It seems to be non repetitive and unique to each user , But the mobile phone number may also be modified . In case something similar happens , It's a big project that breaks bones and muscles .
Usually , We all use numbers or ID A primary key , For example, the primary key of the customer table is the customer number , The order table shows the order ID, The employee table shows the job number .
DB、DBMS、SQL
database (DB)、 Database management software (DBMS) and Structured query language (SQL) These three basic concepts , The relationship among the three 
SQL It is used to deal with relational databases . The relational database contains multiple two-dimensional tables , Each table consists of rows and columns 
A single table describes the relationship between things and attributes , The connection between multiple tables describes the relationship between many different things .
It is different from the forms we usually set up casually , The tables in the database have the following two characteristics :
each Column There are specific data type ;
each That's ok Have a unique logo : Primary key
边栏推荐
- C language converts arrays into binary trees
- Embedded software development stm32f407 key input standard library version
- [Go语言入门] 14 Go语言goroutine和通道详解
- SSM整合(经典自我版)
- [Go语言入门] 07 Go语言字符串
- #导入Word文档图片# 根文件系统制作与挂载
- Introduction to STM32 GPIO details
- 在Colab上训练yolov3(一)
- [introduction to go language] 09 detailed explanation of go language slice
- Swagger快速入门(接口文档)
猜你喜欢

Virtual memory location structure (reserved area, code area, stack area, heap area, literal constant area) and variable modifiers (const, auto, static, register, volatile, extern)

ArkUI路由跳转概览

分布式理论

Chapter I use of DHT11 temperature and humidity sensor

寶塔面板在同一服務器下創建多個端口部署項目(輕量應用服務器一鍵部署網站、博客、GltLab完整版)

Embedded software development stm32f407 key input standard library version
![[Go语言入门] 08 Go语言数组](/img/f6/6e113d9090a0c58a68b2e379e64500.png)
[Go语言入门] 08 Go语言数组

Using idea IntelliJ to view bytecode files

史上最快上手Redis(附加连接云服务器上的Redis)

vant Weapp组件库中 自定义修改van-button 按钮宽高大小
随机推荐
Pyopencv basic operation guide
Redis is the fastest to get started in history (attach redis on ECs)
Supervisor series: 4. Sub process
语音芯片JQ8400的使用心得
在Colab上训练yolov3(一)
[introduction to go language] 10 go language map details
pyopencv基础操作指南
[PCB] some experience about video game hardware design and PCB drawing (continuously updated)
Embedded software development stm32f407 racing lantern standard library version
[Go语言入门] 11 Go语言函数
I learned JWT single sign on with a cup of tea
[introduction to go language] 14 go language goroutine and channel details
[go language introduction] 06 go language circular statement
[Multisim] problems and solutions of Multisim Simulation "zero crossing comparator"
Organize numpy
Théorie de la distribution
General commands of MATLAB
STM32F103 guider - example game Tetris
Vectorization of gradient descent method
What is the function of clearing the interrupt flag in the interrupt program?