当前位置:网站首页>Introduction to database system - Chapter 1 introduction [conceptual model, hierarchical model and three-level mode (external mode, mode, internal mode)]
Introduction to database system - Chapter 1 introduction [conceptual model, hierarchical model and three-level mode (external mode, mode, internal mode)]
2022-07-07 13:38:00 【kokotao】
1, Data system overview
Four basic concepts of database :
data 、 database 、 Database management system 、 Database system ;
- 1 data : The symbolic record that describes things is called data
- 2 Database is stored in computer for a long time 、 Organized 、 A collection of large amounts of data that can be shared .
- 3 Database management system is to solve how to efficiently acquire and maintain data 、 How to organize and store data scientifically
- 4 The database system is controlled by the database 、 data management system ( And its application development tools )、 Storage composed of application and database administrators 、 management 、 A system that processes and maintains data .
The emergence and development of data management technology
- 1 Manual management stage ,2 File system phase ,3 Data system phase
Characteristics of database system
- 1 Data structure : The database system realizes the structure of the whole data , This is one of the main features of the database , It is also the essential difference between database system and file system .
( The whole refers to that the data in the database is no longer only for a certain application , But for the whole organization or enterprise ); It is not only internally structured but also integrally structured , There is a connection between data .
2 High data sharing 、 Low redundancy and easy expansion ;
( Data sharing can also avoid incompatibility and inconsistency between data .)
3 High data independence :
① Physical independence means that the physical storage of data in user applications and databases is independent of each other .
② Logical independence means that the logical structure of the user's application and data are independent of each other .
4 The data is uniformly managed and controlled by the data management system ;
(1) Data security protection ;
(2) Data integrity check ;
(3) concurrency control ;
(4) Data recovery ; - summary : The database is organized and stored in the computer for a long time 、 A lot of 、 Shared data collection . It can be shared by various users , It has minimum redundancy and high data independence . The database management system is established in the database 、 The database shall be under unified control during operation and maintenance , To ensure data integrity and security , And use the database for concurrency control in multiple users at the same time , Recover the database after failure .
2 Data model : Data model is an abstraction of the characteristics of real-world data , Data model is the core and foundation of database system .
Two types of data models ;
The first kind of conceptual model
- Also known as the information model , Modeling data and information according to users' ideas is mainly used in database design .
The second is the logical model and the physical model
conceptual model
- 1 The basic concepts in the information world :
① Entity : Things that exist objectively and can be distinguished from each other
② attribute : An entity has a property called an attribute
③ code (key): The set of attributes that uniquely identify the entity
④: Solid type : Using entity name and its attribute name set to abstract and characterize similar entities , It's called the solid body ;
⑤ Entity set : A set of entities of the same type is called an entity set .
⑥ contact : The relationship between entities usually refers to the relationship between different sets of entities - Entity - How to contact (E—R Model )
The components of the data model : Data model is usually composed of data structure 、 Data operation and data integrity constraints are three parts .
- data structure : Describe the objects that make up the database and the relationships between them .
Data manipulation : It refers to the collection of operations allowed for instances of various objects in the database , Including operation and relevant operation rules .
Data integrity constraints : Data integrity constraints are a set of integrity rules
Common data models
hierarchical model
- 1 There is only one node without parents , This node is called the root node ;
2 Nodes other than the root have only one parent node .
The hierarchical model is like an inverted tree , Node parents are unique .
- 1 There is only one node without parents , This node is called the root node ;
Mesh model
- Data structure of mesh model :
(1) Allow more than one node to have no parents .
(2) A node can have more than one parent .
- Data structure of mesh model :
relational model : The data structure of each relationship is a normalized two-dimensional table
- Some terms of relational model :
① Relationship (relation): Represents a table corresponding to the usual ;
② Tuples (tuple): A row in the table is a tuple ;
③ attribute (attribute): A column in the table is an attribute ;
④ code (key): Also called code key .
⑤ Domain (domain): A field is a set of values of the same data type ;
⑥ component : An attribute value in a tuple .
⑦ Relationship model : Description of the relational model , It is generally expressed as :
Relationship name ( attribute 1, attribute 2,···, attribute n) - The relationship model requires that the relationship must be normalized , Each component of a relationship must be an indivisible data item ( There are no more tables in the table )
- The advantages and disadvantages of the relational model :
One advantage :① The relational model domain format model is different , It is based on strict mathematical concepts ;
② Single concept of relationship model ;
③ Access path of relational model is transparent to users , So it has higher data independence 、 Better security , It also simplifies the work of programmers and database development ;
- Some terms of relational model :
Object oriented data model
Object relational data model
Semi structured data model
3 The structure of the database system
Database system schema concept
- There is... In the data model ” type “ and “ value ” The concept of .
- The pattern is relatively stable , And the examples are relatively variable ;
Three level pattern structure of database system
- 1, Pattern (schema): Patterns are also called logical patterns , It is a description of the logical structure and characteristics of all data in the database , Is a common data view for all users .
- 2 External mode (external schema): Also known as sub mode or user mode , It is the logical structure and feature description of local data that database users can see and use , It's the database user's data view , Is a logical representation of data related to an application .
- 3 Internal mode (internal schema): Internal mode is also called storage mode (storage schema), A database has only one internal schema . It is a description of the physical structure and storage of data , It's how the data is organized inside the database .
Database secondary image function and data independence ( One sentence summary : Adjacent levels have an image )
The database management system provides two layers of images between the three-level modes : External mode / Mode image and mode / Internal mode image . Ensure that the data in the database system can have high logical independence and physical independence .
1 External mode / Pattern image ——> Logical independence
- Modified the table structure ( It's a conceptual model ) You only need to modify the image between the external schema and the conceptual schema ( Change the external mode , Such as the definition of view ), Without modifying the user program .
2 Pattern / Internal mode image ——> Physical independence
- Modified the physical storage method of data ( For example, add a secret ), Table structure ( It's a conceptual model ) Can remain the same .
Composition of data system
- 1 Hardware platform and database
2 Software
3 personnel
summary
The conceptual model is briefly introduced 、 The three elements and three main data models that make up the data model ( hierarchical model 、 Mesh model 、 relational model ), The relationship model will be introduced in detail later .
边栏推荐
- 如何让join跑得更快?
- 交付效率提升52倍,运营效率提升10倍,看《金融云原生技术实践案例汇编》(附下载)
- xshell连接服务器把密钥登陆改为密码登陆
- Flink | multi stream conversion
- Introduction and basic use of stored procedures
- 数字ic设计——SPI
- QQ medicine, Tencent ticket
- Deep understanding of array related problems in C language
- 实现IP地址归属地显示功能、号码归属地查询
- Storage principle inside mongodb
猜你喜欢
Realize the IP address home display function and number home query
ESP32构解工程添加组件
Centso7 OpenSSL error Verify return code: 20 (unable to get local issuer certificate)
JS缓动动画原理教学(超细节)
Introduce six open source protocols in detail (instructions for programmers)
最佳实践 | 用腾讯云AI意愿核身为电话合规保驾护航
Leecode3. Longest substring without repeated characters
2022-7-6 Leetcode27.移除元素——太久没有做题了,为双指针如此狼狈的一天
Cinnamon taskbar speed
Vscode编辑器ESP32头文件波浪线不跳转彻底解决
随机推荐
Custom thread pool rejection policy
【面试高频题】难度 2.5/5,简单结合 DFS 的 Trie 模板级运用题
OSI 七层模型
Getting started with MySQL
JS缓动动画原理教学(超细节)
648. 单词替换 : 字典树的经典运用
[1] ROS2基础知识-操作命令总结版
LeetCode_ Binary search_ Medium_ 153. Find the minimum value in the rotation sort array
How did Guotai Junan Securities open an account? Is it safe to open an account?
MongoDB复制(副本集)总结
DID登陆-MetaMask
单片机原理期末复习笔记
交付效率提升52倍,运营效率提升10倍,看《金融云原生技术实践案例汇编》(附下载)
社会责任·价值共创,中关村网络安全与信息化产业联盟对话网信企业家海泰方圆董事长姜海舟先生
Pay close attention to the work of safety production and make every effort to ensure the safety of people's lives and property
1、深拷贝 2、call apply bind 3、for of for in 区别
记一次 .NET 某新能源系统 线程疯涨 分析
Realbasicvsr test pictures and videos
User management summary of mongodb
php——laravel缓存cache