This is my notes for studying databases. They are very simple and basic database-related knowledge. I have recently sorted out my notes for database study. (1) -- Introduction and basic concepts 1. Data: The symbolic record that describes a thing is called data. 2. Database: a database that has been stored in a computer for a long time.
This is my notes for studying databases. They are very simple and basic database-related knowledge. I have recently sorted out my notes for database study. (1) -- Introduction and basic concepts 1. Data: The symbolic record that describes a thing is called data. 2. Database: a database that has been stored in a computer for a long time.
This is my notes for studying databases. They are very simple and basic database-related knowledge. I have recently sorted it out. I hope you will not give me any help.
Database Study Notes (1)
-- Introduction and Basic Concepts
I,Data: The symbolic record that describes a thing is called data.
II,Database: a group of data that has been stored in a computer for a long time and can be shared.
3,Database Management System: data management software, which provides the following functions:
1,Data Definition:DDL(Data Definition Language).
2,Data manipulation:DML (Data Manipulation Language).
3,Database Operation Management
4,Database creation and maintenance functions
5,Database interface communication
IV,Database System: the system after the database is introduced into a computer system, which consists of the following parts:
1,Database
2,Database Management Tools
3,Application Development Tools
4,Application System
5,Database Administrators and Users
V,Development of Database Management Technology
1,Manual management stage:
Features: data is not stored, data is managed by applications, data is not shared, and data is not independent.
2,File System Management:
Features: data can be stored for a long time. Data is managed by the file system, with poor data sharing, large redundancy, and poor data independence.
3,Database System stage:
Features:1, Data structuring
2High data sharing, low redundancy, and easy expansion
3High Data independence
4, Data fromDBMSUnified management and control.
DBMSIt mainly provides data control in the following aspects:
1,Data security protection
2,Data Integrity check
3,Concurrency Control (coordination of multiple users)
4,Database Restoration
Sat,Data Model
1,The concept of data model: abstraction, representation, and processing of data and information in the real world, that is, simulation of reality.
2,The data model must meet the following requirements:
1,Can simulate the real world more realistically;
2,Easy to understand
3,Easy to implement on Computer
3,Data Model Hierarchy:
1,Conceptual Model: it is also called an information model. It models data and information from the user's point of view and is mainly used for Database Design:
1,Main function: the conceptual model is used for modeling the information world. The conceptual model does not depend on a certainDBMSSupported data models. The conceptual model can be converted toDBMSSupported data models.
2,Main features:
(1)It has strong semantic expression capabilities and can easily and directly express various semantic knowledge in applications.
(2)It should be simple, clear, and easy to understand. It is a language for communication between users and database designers.
3,Basic concepts of the conceptual model:
(1)Entity (Entity): Objects that exist objectively and can be differentiated from each other.
(2)Property (Attribute): A feature of an object.
(3)Code (Key): The property set that uniquely identifies an object.
(4)Domain (Domain): The value range of the attribute.
(5)Solid shape (Entity TypeObjects with the same attributes have common features.
(6)Entity set (Entity Set): A set of the same type of entities is called an entity set.
(7)Contact (Relationship) Links between entities or within entities:
I.One-to-one connection
Ii.One-to-multiple connections
Iii.Multi-to-Multi-contact (M:N)
Iv.Self-Contact
4, Conceptual Model Representation Method (E-RFigure ):
1, Solid shape: represented by a rectangle
2, Attribute: represented by an ellipse
3, Contact: It is represented by a diamond.
2,Data Model: mainly consists of a mesh model, a previous model, and a relational model. It is used to model data from the perspective of a computer system.DBMS.
1,Three elements of data model:
1,Data structure:
The data structure is used to describe the static characteristics of the system. It is a collection of object types studied. These objects are an integral part of the database. They are classified into two types, one of which is the object related to the data type, content, and nature. For example, the domain, attribute, and relation in the relational model, and the object related to the relationship between data.
2,Data Operations: reflect the dynamic attributes of the system.
3,Data constraints:
Data constraints are a set of integrity rules. Integrity rules are the constraints and storage rules for data and their relationships in a given data model. They are used to limit the changes in the database status and status that conform to the data model, to ensure that the data is correct, valid, and compatible. In addition, the data model should also provide a mechanism to define integrity constraints.
3,Data Model classification:
1,Hierarchical Model (Hierarchical Model):
1, Definition:
In the database definition, the set of basic hierarchical connections that meet the following two conditions is a hierarchical model:A.There is only one node with no parent node (root node)
B.Other nodes have only one parent node.
2, Features:
A given record value can only display its full meaning when it is viewed by its path. No child record value can exist independently from the parent record value.
3, Constraints of the hierarchical data model:
The integrity constraints of the layered model must be met during insertion, deletion, and update operations. If no parent node value exists, the child node value cannot be inserted.When you delete a parent node value, the child node value is also deleted. During the update operation, all corresponding records should be updated to ensure data consistency.
4, The Connection Structure of the layered model:
1.Addition Method: stores all record values sequentially in the descending order of the hierarchy tree, that is, the hierarchical order is achieved through the adjacent locations of the physical space.
2.Link Method: Guides are used to reflect the hierarchical connections between data.
4,Advantages and disadvantages of hierarchical models:
Advantages:
1.The data model is simple and easy to operate.
2.The relationship between entities is fixed and pre-defined application systems provide high performance.
3.Provide excellent integrity support.
Disadvantages:
1.It is not suitable for non-hierarchical connections.
2.There are many restrictions on insert and delete operations.
3.The child node must be queried through the parent node.
4.Due to the strict structure, hierarchical commands tend to be procedural.
2,Mesh Model (Network Model)
3,Object-Oriented model (Object Oriented Model)
4,LINK model (Realational Model)
(1)Related Concepts:
I.Link: a two-dimensional table
Ii.Tuples (Tuple): A row in the table is a tuples.
Iii.Property (Attribute): Column 1 in the table is an attribute.
Iv.Master code (Key): An attribute group in a table. You can determine a tuples.
V.Domain (Domain): Attribute value range.
Vi.Component: an attribute value in the tuples.
Vii.Link mode: Description of the link, which is generally expressed:
Link name (Attribute1, Attribute2, Etc)
(2) ExcellentDisadvantages:
Advantages:
1) Relational models are built on strict mathematical concepts.
2) Are expressed by links between entities and entities. The data retrieval result is also a relational (table), soWith a single concept, the data structure is simple and clear.
3)The access path of the relational model is transparent to users, so as to have higher data independence and better security and confidentiality. It also simplifies the work of programmers and the establishment of database development.
Disadvantages:
Because the access path is transparent to users, the query efficiency is often inferior to that of the non-relational data model. Therefore, to improve performance, you must optimize your query requests, increasing the burden on the development database management system.
To be continued
Well-off
2004Year 2Month 21Day Saturday
E-mail: xiaokang1949@hotmail.com