当前位置:网站首页>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 .
边栏推荐
- Solve the cache breakdown problem
- JS function 返回多个值
- Mongodb command summary
- 简单好用的代码规范
- LeetCode_二分搜索_中等_153.寻找旋转排序数组中的最小值
- Cinnamon taskbar speed
- postgresql array类型,每一项拼接
- 2022-7-6 使用SIGURG来接受外带数据,不知道为什么打印不出来
- Pcap learning notes II: pcap4j source code Notes
- Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
猜你喜欢

Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)

118. 杨辉三角

Realize the IP address home display function and number home query

LeetCode简单题分享(20)

最佳实践 | 用腾讯云AI意愿核身为电话合规保驾护航

Navicat run SQL file import data incomplete or import failed

PAcP learning note 1: programming with pcap

Esp32 ① compilation environment

靠卖概念上市,认养一头牛能走多远?

2022-7-7 Leetcode 34.在排序数组中查找元素的第一个和最后一个位置
随机推荐
【日常训练】648. 单词替换
How to make join run faster?
Esp32 series column
.net core 关于redis的pipeline以及事务
提升树莓派性能的方法
记一次 .NET 某新能源系统 线程疯涨 分析
2022-7-6 使用SIGURG来接受外带数据,不知道为什么打印不出来
LeetCode_ Binary search_ Medium_ 153. Find the minimum value in the rotation sort array
118. 杨辉三角
JS function returns multiple values
Split screen bug notes
[etc.] what are the security objectives and implementation methods that cloud computing security expansion requires to focus on?
How far can it go to adopt a cow by selling the concept to the market?
MongoDB命令汇总
【面试高频题】难度 2.5/5,简单结合 DFS 的 Trie 模板级运用题
Learning breakout 2 - about effective learning methods
User management summary of mongodb
[learning notes] segment tree selection
Ogre introduction
Summary of import, export, backup and recovery of mongodb