Database Learning Notes (i)

Source: Internet
Author: User
Notes | data | database
This is my Learning database notes, are very simple, very basic knowledge of the database, recently sorted out, I hope you do not egg me ah, hehe

Database Learning Notes (i)

--Introduction and basic concepts

One, data: The symbolic records describing things are called data.

A database: A collection of organized, shareable data that is stored in a computer for a long time.

Third, the database management system: Data management software, mainly the following functions:

1, data definition: DDL (database definition Language).

2, Data manipulation: DML (manipulation Language).

3, the operation of the database management

4, the establishment of database and maintenance functions

5, the interface of the database communication

Four, database system: The system that introduces the database in the computer systems, consists of the following parts:

1, database

2, database management tools

3, Application development tools

4, Application System

5, database administrators and database users

Five, the development of database management technology

1, the artificial management stage:

Features: Data is not saved, application management data, data is not shared, data is not independent.

2, File System management:

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

3, Database system phase:

Features: 1, data structure of

2, the data sharing is high, the redundancy is low, easy to expand

3, high independence of data

4, the data by the DBMS unified management and control.

DBMS mainly provides data control in the following aspects:

1, security protection of data

2, data integrity check

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

4, Recovery of the database

Vi. Data Models

1, the concept of data Model: abstraction, representation and processing of real-world data and information, that is, realistic simulation.

2, the data model must meet the requirements:

1, can be more realistic simulation of the real world;

2, easy for people to understand

3, easy to implement on the computer

3, the level of the data model:

1, conceptual model: Also known as the information model, according to the user's point of view of data and information modeling, mainly for database design:

1, the main function: conceptual model for the information World modeling. The conceptual model does not depend on a data model supported by one DBMS. A conceptual model can be converted to a specific data model supported by a DBMS on a computer.

2, Main features:

(1) has the strong semantic expression ability, can express the various semantic knowledge in the application conveniently and directly.
(2) should be simple, clear, easy to understand users, users and database designers to communicate between the language.

3, the conceptual model of the basic concepts:

(1) Entity (Entity): something that exists objectively and can be distinguished from another.

(2) attribute: An attribute of an entity.

(3) code (KEY): A property set that uniquely identifies an entity.

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

(5) Entities with the same attributes of entity type (Entity type) have common characteristics.

(6) Entity set (Entity set): A collection of identical entities is called an entity set.

(7) Contact between (relationship) entities or within entities, the following categories:

I. One-to-one contact

Ii. a One-to-many connection

III. Multi-Link (m:n)

Iv. Self-Contact

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

1, Entity type: rectangular representation

2, attributes: represented by ellipses

3, contact: with a diamond.

2, the data model: mainly includes the network model, once is the model, the relational model, is according to the computer system viewpoint to the data modelling, mainly uses in the DBMS realization.

1, the data model three elements:

1, data structure:

The data structure is used to describe the static characteristics of the system. It is the collection of object types being studied. These objects are part of the database, there are two classes, a class of research and data types, content, nature related to the object. For example, domains, attributes, relationships, and so on in the relational model, and other research objects related to the connection between data.

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

3, the data constraint conditions:

The constraint of a data is a collection of a set of integrity rules. The integrity rule is the restriction and storage rules of data and its connection in a given data model, which can be used to limit the state of database and the change of State in order to ensure the correctness, validity and compatibility of data. In addition, the data model should provide a mechanism for defining the integrity constraints.

3, classification of data models:

1, hierarchical model (hierarchical models):

1, definition:

The collection of base-level contacts that meet the following two conditions in the database definition is a hierarchical model: a. There is and only one node without a parent node (root node)
B. Other nodes have and have only one parent node.

2, Features:

Any given record value is only visible when viewed by its path, and no child record value can exist independently of the parent record value.

3, the constraint conditions of the hierarchical data model:

The integrity constraints of the hierarchical model are met when inserting, deleting, and updating operations. When inserting, the child node value cannot be inserted without the corresponding parent node value. When a delete operation is removed, the corresponding child node value is also deleted if the parent node value is deleted. All corresponding records should be updated to ensure data consistency when the update operation is performed.

4, the hierarchical model of the connection structure:

1. Adjacency method: According to the order of the hierarchy tree before the sequence of the sequence of all records are contiguous to store, that is, the location of physical space adjacent to achieve hierarchical order.
2. Link method: Use the Guide element to reflect the hierarchical relationship between the data.

4, the advantages and disadvantages of the hierarchical model:

Advantages:
1. The data model is relatively simple and simple to operate.
2. The relationship between the entities is fixed, and the predefined application system, the performance is high.
3. Provide good integrity support.
Disadvantages:
1. It is not appropriate to indicate a non hierarchical link.
2. There are more restrictions on insert and delete operations.
3. The children's nodes must be queried through their parents ' points.
4. Because of its tight structure, hierarchy commands tend to be programmed.

2, mesh models (network model)

3, object-oriented model (object oriented models)

4, relational model (realational models)

(1) Related concepts:

I. Relationship: A two-dimensional table

II. Tuple (Tuple): A tuple of one behavior in a table.

Attribute: One of the columns in the table is a property.

IV. Main code: A group of properties in a table that determines a tuple.

V. Domain: A property takes a range of values.

VI. Component: A property value in a tuple.

VII. Relationship Model: A description of a relationship, generally expressed as:

Relationship name (property 1, Property 2, etc.)

(2) Advantages and disadvantages:

Advantages:
1 The relational model is based on strict mathematical concepts.
2 The relationship between the entity and entities is expressed in relation to each other. The result of data retrieval is also the relation (i.e. table), so the concept is single and its data structure is simple and clear.
3 The access path of the relational model is transparent to the user, thus it has higher data independence, better security confidentiality, and simplifies the work of programmer and the establishment of database development.
Disadvantages:
Because access paths are transparent to the user, query efficiency is often inferior to the non relational data model. Therefore, in order to improve the performance, it is necessary to optimize the user's query request and increase the burden of developing the database management system.





To be Continued











Off

February 21, 2004 Saturday

E-mail:xiaokang1949@hotmail.com






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.