Database System for beginners

Source: Internet
Author: User

Database System Overview

I. data, databases, database management systems, and database systems

1. Data. Data is the basic object stored in the database. Data is a symbolic record describing a thing. Symbols used to describe things can be numbers, texts, graphs, images, sounds, languages, etc. They can all be digitalized and stored in computers.

2. Database (db ). A database is a collection of large amounts of data that has been stored in a computer for a long time, organized, and shared. The data in the data is organized, described, and stored according to a certain data model. It has a small degree of redundancy, high data independence and scalability, and can be shared with various users.

3. Database Management System (DBMS ). The database management system is a layer of data management software between users and operating systems. The database management system and the operating system are the basic software of computers, including: 1) data definition function, 2) data organization, storage and management, 3) data manipulation function, 4) database Transaction Management and operation management, 5) database creation and maintenance functions, 6) Other functions

4. database system. A database system is a system after a database is introduced into a computer system. It generally consists of a database, a database management system (and its development tools), an application system, and a database administrator. A database system is also called a database.

Ii. database features

1. Data structuring

2. High data sharing, low redundancy, and easy expansion

3. High Data independence

4. Data is centrally managed and controlled by DBMS

Iii. Data Model

1. The data model is an abstraction of real-world data features and is used to describe data, organize data, and perform operations. Data models can be divided into two types: 1) a conceptual model, also called an information model, is used to model data and information based on the user's point of view and is mainly used for database design. 2) logical models and physical models. Logical models mainly include hierarchical models, mesh models, relational models, object-oriented models, and object relationship models. Physical models are the abstraction of the lowest data layer, it describes the representation and access methods of data in the system and is intended for computer systems.

2. Elements of the data model.

1) Data Structure

2) Data Operations

3) Constraints on Data Integrity

3. Conceptual Model

1) Basic concepts include: entity, attribute, code (key), domain, entity, entity set, and connection.

2) the relationships between two solid types include one-to-one, one-to-multiple, and many-to-many.

4. The most common data models are hierarchical model, mesh model, relational model, object-oriented model, and object relational model.

5. Hierarchical Model

** Data structure in a layered model

1) the layered model must meet two conditions: A. There is only one node with no parent node, that is, there is only one root node; b. Other nodes except the root node have only one parent node;

2) the hierarchical model database can only process one-to-many physical connections;

3) basis point feature: only when a given record value is viewed by its path can it show its full meaning. No child record value can exist independently of the parent record value.

** Multi-to-Multi-link representation in the layered model

To use a hierarchical model to express multiple-to-multiple connections, you must first split multiple-to-multiple connections into one-to-multiple connections. There are two kinds of decomposition methods: redundancy and virtual knots.

** Data manipulation and integrity constraints of a layered model

1) query, insert, delete, and update operations

2) during the insert operation, the child node value cannot be inserted without the corresponding parent node value.

3) during the delete operation, if the value of the parent node is deleted, the corresponding child node value is also deleted.

** Hierarchical Data Model Storage Structure

1) The addition method reflects the hierarchical order by believing the location of the physical space;

2) The Link Method Uses pointers to reflect the hierarchical connections between data;

** Advantages and disadvantages

Excellent: The data structure is simple and clear, the query efficiency is high, and the Integrity support is high;

Lack: There are many discrepancies with the real world, there are many restrictions on insertion and deletion, hierarchical commands tend to be procedural

6. Mesh Model

** Data structure of the mesh model

1) the layered model must meet two conditions: A. allow more than one node to have no parent; B. One node can have more than one parent node;

2) the layered model is actually a special case of the mesh model;

** Control and integrity constraints of the mesh Data Model

1) supports the concept of record code, which is a set of data items that uniquely identify a record;

2) Ensure that there is one-to-many relationship between the parent and child records in one contact;

3) Some constraints between the parent and child records are supported;

** Storage structure of the mesh Data Model

Link Method, including: One-Way link, two-way link, ring link, and forward link; guidance element array method; binary array method; index method;

7. Relational Model

** Data structure of the relational model

1) Link: A link corresponds to a table;

2) No group: one row in the table is a no group;

3) attribute: a column in the table is an attribute. Each attribute is named by the attribute name;

4) code: it is also called a code key. An Attribute Group in a table that uniquely identifies a tuples.

5) field: the value range of the attribute;

6) component: an attribute value in the tuples;

7) link mode: Description of the link;

** Control and integrity constraints

1) supports querying, inserting, deleting, and updating data;

2) in the relational model, data operations are set operations, and the operation objects and operation results are both links, that is, a set of several tuples, rather than a single record operation method in the formatting model. Hidden path and operation method.

Iv. Database System Structure

1. Mode: it refers to the logical structure and sacrifice description of all data in the database. It only involves the type description, not the specific value;

2. Three-Level mode structure of the database system: composed of three levels: external mode, mode, and internal mode;

1) mode: it is also called the logical mode. It describes the logical structure and features of all data in the database and is the public data view of all users. It is the middle layer of the database mode structure. It neither involves the physical storage details and hardware environment of the data, nor is it related to the government applications, the application development tools used, and the advanced programming language. Mode is actually a logical view of database data. A database has only one mode.

2) external mode: Also known as submode or user mode. It is the logical structure and feature description of local data that can be viewed and used by database users. It is the data view of database users, it is the logical representation of data related to the middleware application. The external mode is usually a subset of the mode. A database can have multiple external modes.

3) Internal Mode: storage mode. A database has only one internal mode. It describes the physical structure and storage mode of data and represents the data in the database.

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.