当前位置:网站首页>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 .
边栏推荐
- Scripy tutorial classic practice [New Concept English]
- 记一次 .NET 某新能源系统 线程疯涨 分析
- Redis只能做缓存?太out了!
- OSI seven layer model
- move base参数解析及经验总结
- [1] Basic knowledge of ros2 - summary version of operation commands
- MongoDB优化的几点原则
- MongoDB内部的存储原理
- Shell batch file name (excluding extension) lowercase to uppercase
- Realbasicvsr test pictures and videos
猜你喜欢
2022-7-6 Leetcode 977.有序数组的平方
[dark horse morning post] Huawei refutes rumors about "military master" Chen Chunhua; Hengchi 5 has a pre-sale price of 179000 yuan; Jay Chou's new album MV has played more than 100 million in 3 hours
OSI seven layer model
2022-7-7 Leetcode 34.在排序数组中查找元素的第一个和最后一个位置
Realize the IP address home display function and number home query
MySQL error 28 and solution
LeetCode简单题分享(20)
JS缓动动画原理教学(超细节)
Centso7 OpenSSL error Verify return code: 20 (unable to get local issuer certificate)
Error lnk2019: unresolved external symbol
随机推荐
LED light of single chip microcomputer learning notes
ESP32 ① 编译环境
ESP32系列专栏
[1] Basic knowledge of ros2 - summary version of operation commands
靠卖概念上市,认养一头牛能走多远?
How to make the new window opened by electorn on the window taskbar
2022-7-6 Leetcode 977.有序数组的平方
Mongodb slice summary
简单好用的代码规范
LeetCode_二分搜索_中等_153.寻找旋转排序数组中的最小值
[learning notes] segment tree selection
Pay close attention to the work of safety production and make every effort to ensure the safety of people's lives and property
云计算安全扩展要求关注的安全目标和实现方式区分原则有哪些?
Read PG in data warehouse in one article_ stat
高端了8年,雅迪如今怎么样?
分布式事务解决方案
Mongodb command summary
move base参数解析及经验总结
MongoDB优化的几点原则
Cmake learning and use notes (1)