当前位置:网站首页>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 .
边栏推荐
- 融合CDN,为客户打造极致服务体验!
- great! Auto like, I use pyautogui!
- Efficient NoSQL database service Amazon dynamodb experience sharing
- In Net 6 using dotnet format formatting code
- buuctf(re)
- PostgreSQL database Wal - RM_ HEAP_ ID logging action
- Join() in JSZ
- File upload vulnerability shooting range upload labs learning (pass1-pass5)
- leetcode1221. Split balance string
- Working principle of asemi three-phase rectifier bridge
猜你喜欢

魔法猪系统重装大师怎么使用

What if win11 Bluetooth fails to connect? Solution of win11 Bluetooth unable to connect
![[untitled]](/img/68/5e711f7c473dcea54a56f7b7e48604.png)
[untitled]

What is Ethernet and how to connect the computer

Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影

【FLink】access closed classloader classloader. check-leaked-classloader

Summary of SQL injection (I)

为什么SQL语句命中索引比不命中索引要快?

In Net 6 using dotnet format formatting code

Teach you to write non maintainable PHP code step by step
随机推荐
Difference between asemi high power FET and triode
[image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]
本轮压力测试下,DeFi协议们表现如何?
2.0springmvc uses restful
Coordinate system left multiply right multiply
JS' sort() function
PostgreSQL database Wal - RM_ HEAP_ ID logging action
In Net 6 using dotnet format formatting code
dotnet-exec 0.4.0 released
How do the defi protocols perform under this round of stress test?
【Flink】RocksDB增量模式checkpoint大小持续增长的问题及解决
Wechat applet new version prompt update
ASEMI大功率场效应管和三极管的区别
dotnet-exec 0.4.0 released
Vscode 设置clang-format
buuctf(re)
Two hours to take you into the software testing industry (with a full set of software testing learning routes)
How to open the DWG file of the computer
great! Auto like, I use pyautogui!
Triangle class (construction and deconstruction)