Database learning notes (1)

zhaozj2021-02-16  59

This is what I learned the database is very simple, very basic about the knowledge of the database. Recently, I hope that everyone will not be eggs, huh, huh.

Database learning notes (1)

- Introduction and Basic Concept

First, data: Describe the symbol record of things is called data.

Second, the database: refers to a long-term stored in a computer, organized, and shared data collection.

Third, the database management system: the software of data management, the main functions:

1. Data Definition: DDL (Data Definition Language).

2, data manipulation: DML (Data Manipulation Language).

3, the running management of the database

4, the establishment and maintenance of the database

5, the interface communication of the database

Fourth, the database system: The system after the database is introduced into the computer system, consists of the following parts:

1, database

2, Database Management Tool

3, application development tools

4, application system

5, database administrator and database users

V. Development of database management technology

1. Artificial management stage:

Features: Data is not saved, application management data, data is not shared, and data does not have independence.

2, file system management:

Features: Data can be saved for a long time, managed data by file system, poor data sharing, large redundancy, poor data independence.

3, the database system phase:

Features: 1, data structure

2, the sharing property of the data, low redundancy, easy to expand

3, the independence of the data is high

4, data is managed and controlled by DBMS.

DBMS mainly provides the following aspects of data control:

1, data security protection

2, data integrity check

3, concurrent control (coordination of multi-user use)

4, database recovery

Six, data model

1. Concept of data model: Abstraction, representation and processing data and information in the real world, that is, realistic simulation.

2, the data model must meet the requirements:

1. It can relatively real simulate the real world;

2, easy to understand

3, easy to implement on the computer

3, level of data model:

1, conceptual model: also known as the information model, modeling data and information, mainly for database design, according to user views, mainly for database design:

1. Main functions: conceptual model is used in the modeling of the information world. The conceptual model does not rely on a data model supported by a DBMS. The conceptual model can be converted to a specific data model supported on a computer on a computer.

2. Main features:

(1) Has strong semantic expressive ability, convenient, direct expression of various semantics knowledge in the application. (2) It should be simple, clear, easy to understand, and is the language of communicating with database designers.

3, conceptual concept of concept model:

(1) Entity: objectively existently and can distinguishably. (2) Attribute: a particular feature of the entity.

(3) Code: Unique identity entity's property set.

(4) Domain: The value range of the property.

(5) Entity of entity type is a common feature of entities.

(6) Entity Set: Collection of the same entity is called an entity set.

(7) Contact between the relationship entity or the interior of the entity, the following categories:

i. One-on-one connection

Ii. One-to-many contact

Iii. Multi-to-many connections (M: N)

Iv. Self contact

4, representation of the concept model (E-R Figure):

1, physical type: expressed with rectangular

2, attribute: expressed with ellipse

3, contact: Use a diamond shape.

2, data model: mainly including the mesh model, once model, relational model, is the implementation of data on the computer system, mainly for DBMS implementation.

1, data model three elements:

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 components of the database, have two types, one type of research and data type, content, and nature. For example, domain, attributes, relationships, etc. in the relational model; another type of research related to the contact between the data.

2, data operation: reflect the dynamic properties of the system.

3, data constraints:

The constraints of data are a collection of integrity rules. Integrity rules are the restrictions and storage rules of data and their contacts in a given data model to define a database status that meets the data model and changes to ensure the correct, effective, compatible. In addition, the data model should also provide a mechanism for defining integrity constraints.

3. Classification of data models:

1, hierarchical model:

1, definition:

A collection of basic hierarchical contacts that meet the following two conditions in the database definition are hierarchical models: a. Some and only one node has no double-processes (root nodes) b. Other nodes outside, there is only one double-pro-point point .

2. Features:

Any given record value can only show all its meaning when viewed by its path, without a child record value can be independently exist from the dual-pro recording value.

3, constraints for hierarchical data model:

Insert, delete, and update the integrity constraint condition of the hierarchy model. When the insertion operation is performed, if there is no corresponding dual-processes point value, the child node value cannot be inserted. When deleting operations, if the dual-processed point value is deleted, the corresponding child node value is also deleted. When updating, you should update all the corresponding records to ensure the consistency of the data.

4, the connection structure of the hierarchical model:

1. Adjacent: All recording values ​​are sequentially stored in sequence according to the order of hierarchy tree preface, that is, the hierarchical order is achieved by neighboring the location of the physical space. 2. Link method: Use the guidance to reflect the hierarchical contact between the data. 4, the advantages and disadvantages of the hierarchical model:

Advantages: 1. The data model is relatively simple and easy to operate. 2. Contacts between entities is fixed, and pre-defined applications, high performance. 3. Provide good integrity support. Disadvantages: 1. Not suitable for indicating non-hierarchical contacts. 2. There is more limitations to insert and delete operations. 3. Query the child's node must pass the dual kids. 4. Due to the strict structure, the hierarchical command tends to be programmed.

2, mesh model (Network model)

3, object-oriented model (Object Oriented Model)

4, relational model (Realismal Model)

(1) Related concepts:

i. Relationship: a two-dimensional table

Ii. Tuple: One line in the table is a tuple.

III. Attribute: One of the lists in the table as an attribute.

Iv. Home Code (KEY): A group of attribute groups in the table can determine a tuple.

v. Domain: attribute value range.

Vi. Component: One attribute value in the tuple.

VII. Relationship mode: Description of the relationship, generally expressed:

Relationn name (attribute 1, property 2, etc.)

(2) Excellent and disadvantages:

Advantages: 1) The relationship model is based on strict mathematical concepts. 2) Whether the entity or entity is represented by a relationship. The search results for the data are also the relationship (ie, table), so the concept is single, its data structure is simple, clear. 3) The access path of the relationship model is transparent to the user, thereby having higher data independence, better security, and simplifies the work of programmers and database development. Disadvantages: Due to the transparency of the access path, query efficiency is often better than non-relational data models. Therefore, in order to improve performance, the user's query request must be optimized, and the burden on the development database management system is added.

Last continued

Well-off

2004

year

2

month

twenty one

day

on Saturday

E-mail: xiaokang1949@hotmail.com

转载请注明原文地址:https://www.9cbs.com/read-22291.html

New Post(0)