当前位置:网站首页>Database overview
Database overview
2022-06-25 04:54:00 【Cn Sirius】
Brief introduction of database
Show the world , The information world , Machine world
| Three worlds | Real world | The information world | Machine world |
|---|---|---|---|
| Yes | The individual of things | Entity | Record |
| Should be | Things as a whole | Entity set | file |
| Turn off | Characteristics of things | attribute | Field |
| system | The connection between things | conceptual model | Data model |
Three level mode Secondary independence Secondary image
Three level mode
| Three level mode | External mode | Pattern | Internal mode |
|---|---|---|---|
| Corresponding level | User level | Concept level | Physical level |
Enable users at different levels to form different views of the database .
Secondary image
External mode - Pattern
Ensure logical independence of data
There can be any number of external modes for the same mode , For every outer pattern , Database systems all have an external schema / Pattern image .
When the pattern changes , The database administrator controls each external mode / Change the image of the pattern accordingly , You can keep the outer mode unchanged . The application program is written in an external mode of data , So the application doesn't have to be modified , Ensure the independence of data and program , The logical independence of data .
Pattern - Internal mode
Ensure the physical independence of data and program , Physical independence of data .
There is only one schema in the database , There is only one internal mode , So the pattern / Internal mode image is unique . This image definition is usually included in the schema description
When the storage structure of the database changes ( That is, the internal mode changes ), The database administrator modifies the schema / Internal mode image , Leave the mode unchanged . Application is not affected , Ensure the physical independence of data and program , Physical independence of data .
Primary key Foreign keys
create table a(
a1 primary key,// Primary key
a2
);
create table b(
b1,
foreign key(b1) references a(a1),// Primary foreign key Association
);
The concept of code classification
Code is a basic concept in data system . A code is an attribute that uniquely identifies an entity , He is the property of the whole entity set , Not the nature of a single entity .
Definition of candidate code : If the value of an attribute group in the relationship can uniquely identify a primitive ancestor , The attribute group is called candidate code ;
Definition of master code : If a relationship has multiple candidates , Select one of the main codes ;
Main attribute definition : The attributes of candidate codes are called primary attributes ;
Non primary attribute definition : Attributes that are not included in any candidate code are called non primary attributes ;
Entity integrity rules : If the property ( An attribute or set of attributes )A It's the basic relationship R The main attribute of , be A Can't take null value .
边栏推荐
- ASEMI三相整流桥的工作原理
- Construction scheme of distributed websocket
- 以太网是什么要怎么连接电脑
- 固态硬盘开盘数据恢复的方法
- Huawei Hongmeng development lesson 4
- What if the desktop computer is not connected to WiFi
- Kotlin Compose 监听软键盘 点击enter提交事件
- Opensea PHP development kit
- [image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]
- Integrate CDN to create the ultimate service experience for customers!
猜你喜欢
随机推荐
Web3 DAPP user experience best practices
小白一键重装官网下载使用方法
Triangle class (construction and deconstruction)
How to apply for software
Introduction to the hardest core PWN in the whole network_ Graphic analysis
SRC platform summary
Separation of storage and computing in Dahua cloud native database
Code scanning payment flow chart of Alipay payment function developed by PHP
Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影
Penetration information collection steps (simplified version)
Why does the SQL statement hit the index faster than it does not?
Compatible with Internet Explorer
执行SQL响应比较慢,你有哪些排查思路?
Web3 DApp用户体验最佳实践
Write shell script error summary
File upload vulnerability shooting range upload labs learning (pass1-pass5)
渗透测试-目录遍历漏洞
两小时带你进入软件测试行业风口(附全套软件测试学习路线)
PostgreSQL database Wal - RM_ HEAP_ ID logging action
ASEMI三相整流桥的工作原理









