当前位置:网站首页>[MySQL] takes you to the database
[MySQL] takes you to the database
2022-07-25 16:31:00 【Hua Weiyun】
A database is an organized and sharable data set stored in a computer for a long time .
It's time to learn !
1.1 Several basic concepts of database
1.2 The emergence and development of data management technology
1.3 Characteristics of database system
2.2 The components of the data model
3. The structure of the database system
3.1 The composition of database system pattern
3.2 Three level schema structure of database schema
3.3 Secondary image of database
4. Composition of database system
5.MySQL Installation and configuration tutorial
1. Database system overview
1.1 Several basic concepts of database
Database is an effective technology of data management , It is an important branch of computer development . Four concepts to understand before learning about databases :
data : The basic object stored in a database , It's a symbolic record of things .
database : A warehouse for storing data , An organized and sharable collection of data stored in a computer for a long time .
Database management system : A layer of data management software located between the user and the operating system , Scientific organization and storage , Efficient acquisition and maintenance .
Database system : database , Database management system , Applications and database administrators .
1.2 The emergence and development of data management technology
Data management is generated according to the needs of data management tasks , Data management refers to the classification of data , organization , code , Storage , Retrieval and maintenance . Data management technology has experienced manual management , file system , There are three stages of database system .
Manual management :
- Data is not saved
- Application management data
- Data is not shared
- Data is not independent
file system :
- Data can be saved for a long time
- The file system manages the data
- Poor data sharing , It's redundant
- Data independence is poor
Database system :
- In order to meet the needs of multi-user and multi application data sharing , Make data serve as many applications as possible , The application of database system , Software that specifically manages data has emerged —— Database management system . It is suitable for large-scale data management , High sharing , Little redundancy , Overall structure , Safe and reliable .
1.3 Characteristics of database system
The database system provides powerful operation , For example, the query operation can be implemented with only one statement , Compared with file system, database system has the following characteristics :
- Data structure : Realize the overall data structure , Not for an application , A whole oriented organization or enterprise , There is a connection between the data .
- High data sharing , Low redundancy and easy expansion : Data sharing reduces data redundancy , Save memory space , At the same time, it avoids the incompatibility and inconsistency between data .
- High data independence :(1). Physical independence : The physical storage of data in the user's application and database is independent .(2). Logical independence : The logical structure of the user's application and database is independent .
- The data is uniformly managed and controlled by the data management system :
- Data security protection : Protect data and prevent data leakage caused by illegal use .
- Data integrity : The correctness of the data , Effectiveness and compatibility .
- concurrency control : Control and coordinate when multiple users access and modify the database at the same time .
- Database recovery technology : When the database fails due to various reasons, the correctness of the data will not be affected .
2. Data model
A map , A model aircraft is a model , Models make people think of things in life . Data model is also a model , It's an abstraction of real world data features . Data model is used to describe data , Organizing and operating data .
2.1 Two types of data models
The data model should meet three requirements : Real simulations show the world , It is understood by people and easy to realize by computer .
The first category : conceptual model
The second category : Logical model and physical model
1. conceptual model
Conceptual model is an intermediate level from the real world to the machine world , It's the first level of abstraction from the real world to the information world , It is a useful tool for database designers to design databases . The main concepts involved in the information world are :
Entity : Things that exist objectively and can be distinguished from each other
attribute : The characteristics of an entity
code : The attribute that uniquely identifies the entity
Solid type : Use entity name and entity attribute set to abstract similar entities
Entity set : A collection of entities of the same type
contact : The relation between entities usually refers to the relation between sets of entities , There are one-to-one relationships between entities , One to many , Many to many
2. Entity - How to contact
conceptual model Modeling the information world , So the concept model can accurately express the common concepts of the information world . We use it E-R Figure to represent the conceptual model of the real world .
2.2 The components of the data model
The data model is usually composed of data structure , Data manipulation And data Integrity constraints Three parts .
- data structure : Description of the static characteristics of the system
- Data manipulation : A collection of operations allowed by objects in a database
- Data integrity constraints : The constraints and dependency rules of data and its connections
2.3 Common data models
The main logical data models in the database are :
- hierarchical model :
Use tree structure to represent various entities and the relationship between entities . The structure is clear , High query efficiency , Provides good integrity support , But because there are many connections in the real world, they are non hierarchical , And the query child node must pass through the parent node , So there are drawbacks .
- Mesh model
Mesh models are more common than hierarchical models , Multiple nodes without parent nodes are allowed , Multiple parent nodes are allowed . The mesh model can describe the real world better than the hierarchical model , And high access efficiency , however , It has some disadvantages such as complex structure .
- relational model
Relationship name : Table name
Relationship : A relationship corresponds to a table
Tuples : A row in the table is a tuple
attribute : A column in the table is an attribute
code : A property group in the table , A tuple can be uniquely determined
Domain : A set of values with the same data type
component : An attribute value in a tuple
Relationship model : Relationship name ( attribute 1, attribute 2...)
Relational database The relationship model is adopted . A relational model consists of a set of relationships , The data structure of each relationship is a normalized two-dimensional table . The structure is clear , Access path is transparent to users , And it has higher data independence , Security . however , The query efficiency is often not as good as the previous formatting model , So this is the query optimization .
- Object oriented data model
- Object relational data model, etc
3. The structure of the database system
Database system usually adopts three-level mode structure .
3.1 The composition of database system pattern
There is... In the data model type and value The concept of , But a schema is a description of the logical structure and characteristics of all data in a database , Only type but not value . The pattern is relatively stable , But instances are variable .
3.2 Three level schema structure of database schema
- Pattern : Logical mode , It is a description of the logical structure and characteristics of all the data in the data .
- External mode : User mode , A description of the logical structure and characteristics of local data that database users can see and use .
- Internal mode : A database has only one internal schema , It is a description of physical structure and storage mode .
3.3 Secondary image of database
The three-level schema in a database is the three levels of abstraction of the database , It leaves the specific organization of data to the database management system . In order to realize the connection and transformation of three abstract levels within the system , The database management system provides two layers of images between these three-level patterns : External mode / Pattern image and Pattern / Internal mode image .
4. Composition of database system
The database system consists of database , Database management system , Applications and Database administrator form .
5.MySQL Installation and configuration tutorial
Download and install the configuration MySQL Database management system encountered many problems , A detailed tutorial is attached , For reference .
1. download
- Visit the official website :
2. install
- Install it into the corresponding file directory according to your own needs
3. Configure environment variables
- System -> Advanced system setup -> environment variable -> System variables (Path). Install MySQL Of bin Copy directory to Path Variable
Download complete , Starting the database service and logging into the database can read :
边栏推荐
- 测试框架-unittest-跳过测试
- Register service instances in ngmodule through dependency injection
- Upgrade esxi6.7.0 to 7.0u3f (updated on July 12, 2022)
- MyBaits
- 测试框架-unittest-命令行操作、断言方法
- doGet与doPost
- 百度富文本编辑器UEditor单张图片上传跨域
- Fudan University emba2022 graduation season - graduation does not forget the original intention and glory to embark on the journey again
- 城市燃气安全再拉警钟,如何防患于未“燃”?
- The presentation logic of mail sending and receiving inbox outbox and reply to the problem of broken chain
猜你喜欢

Visual studio 2022 view class diagram
![Leetcode:528. select randomly according to the weight [ordinary random failure + prefix and dichotomy]](/img/fb/8178388f8c9ac80d95140378d24238.png)
Leetcode:528. select randomly according to the weight [ordinary random failure + prefix and dichotomy]
![Leetcode:6127. Number of high-quality number pairs [bit operation finding rules + the sum of two numbers is greater than or equal to K + dichotomy]](/img/b5/5c7fc70b8025cf7ef21d645a3ac22e.png)
Leetcode:6127. Number of high-quality number pairs [bit operation finding rules + the sum of two numbers is greater than or equal to K + dichotomy]

Product dynamics - Android 13 high-efficiency adaptation new upgrade

进程之间的通信(管道详解)

IaaS基础架构云 —— 云网络

152. Product maximum subarray

如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?

Communication between processes (pipeline details)

聊聊如何用 Redis 实现分布式锁?
随机推荐
MySQL global lock
easyui datagrid控件使用
从业务需求出发,开启IDC高效运维之路
Communication between processes (pipeline details)
ILSSI认证|六西格玛DMAIC的历程
Google Earth Engine——全球建筑物GlobalMLBuildingFootprints矢量集合下载
Permission management - role assignment menu
一文理解分布式开发中的服务治理
Shared lock
C# 音乐
Quickly deploy mqtt clusters on AWS using terraform
伦敦银K线图的各种有用形态
MySQL implicit lock
柏睿数据加入阿里云PolarDB开源数据库社区
MyBaits
狂神redis笔记12
MYSQL导入sqllite表格的两种方法
Is the win11 dynamic tile gone? Method of restoring dynamic tile in Win 11
Two methods of importing sqllite table from MySQL
测试驱动开发(TDD)在线练功房 | 9月17日开课









