Current location - Loan Platform Complete Network - Big data management - Some concepts of database
Some concepts of database
Basic Concepts of Database Systems

Data: is actually a symbolic record that describes things.

Characteristics of data: it has a certain structure, there is a difference between type and value, such as integer, real, character, and so on. And the value of the data gives the value in line with the stereotype, such as the integer value of 15.

Database: is a collection of data, with a unified structure and stored in a unified storage medium, is the integration of a variety of application data, and can be used by the various applications **** enjoy.

The data stored in the database is stored according to the data provided by the data model, with the integration and **** enjoy the characteristics.

Database management system: a system software, responsible for data organization, data manipulation, data maintenance, control and protection and data services in the database, is the core of the database.

Database management system functions:

(1) data schema definition: that is, for the database to build its data framework;

(2) physical construction of data access: physical access to the data schema and the construction of the data to provide effective access to the methods and means;

(3) data manipulation: for the user to use the data in the database to provide convenience, such as query, insert, modify, delete, etc., as well as simple access to data.

(3) data manipulation: to facilitate the user's use of database data, such as query, insertion, modification, deletion, etc., as well as simple arithmetic operations and statistics;

(4) integrity of the data, security definitions and checking;

(5) concurrency control of databases and failures to recover;

(6) data services: such as copying, redepositing, reorganization, performance monitoring, analysis, and so on.

In order to complete the above six functions, the database management system provides the following data language:

(1) data definition language: responsible for the definition of the data schema and the construction of physical access to the data;

(2) data manipulation language: responsible for the manipulation of data, such as querying and additions, deletions, changes, etc.

(3) data control language: responsible for the definition and security of data integrity and security. (3) data control language: responsible for the definition and checking of data integrity, security, and concurrency control, fault recovery and so on.

The data language according to its use has two structural forms: interactive commands (also known as self-contained or autonomous language) host-type language (generally embedded in some host language).

Database administrators: professional managers who plan, design, maintain, and monitor databases.

Database system: by the database (data), database management system (software), database administrators (personnel), hardware platform (hardware), software platform (software) five parts of the operating entity.

Database application system: by the database system, application software and application interface of the three components.

File system stage: provides simple data **** enjoyment and data management capabilities, but it can not provide a complete, unified, management and data **** enjoyment capabilities.

Hierarchical database and mesh database system stage : provides a strong support for the unification and **** enjoyment of data.

Relational database system stage

The basic characteristics of the database system: data integration, high **** enjoyment of data and low redundancy, data independence (physical independence and logical independence), unified management and control of data.

Three-level model of the database system:

(1) conceptual schema: the description of the logical structure of the global data in the database system, all the users of the public **** data view;

(2) external schema: also referred to as sub-schema and user mode. Is the user's data view, that is, the user sees the data schema;

(3) within the schema: also known as the physical model, it gives the database physical storage structure and physical access methods.

Two levels of mapping in a database system:

(1) conceptual schema to inner schema mapping;

(2) outer schema to conceptual schema mapping.

4.2 Data Model

The concept of data model: it is an abstraction of data features, describes the static features, dynamic behavior and constraints of the system at an abstract level, and provides an abstract framework for the information tables and operations of the database system. Describes data structures, data operations, and data constraints.

Basic Concepts of the E-R Model

(1) Entity: things in the real world;

(2) Attribute: characteristics of things;

(3) Connection: relationships between things in the real world. There are one-to-one, one-to-many, and many-to-many connections for sets of entities.

The linkage between the three basic concepts of the E-R model: entities are the basic units in the conceptual world, attributes have attribute domains, and each entity can take the values in the attribute domains. All attribute values of an entity are called tuples.

Diagrammatic methods of the E-R model: (1) entity set representation; (2) attribute table method; (3) linkage representation.

The basic structure of the hierarchical model is a tree structure with the following characteristics:

(1) Each tree has one and only one node with no parents, called the root;

(2) All nodes in the tree except the root have one and only one parent.

Graph-theoretically, the mesh model is an undirected graph without any conditional restrictions.

The relational model is represented using two-dimensional tables, or tables for short, consisting of a table frame and a tuple of tables. A two-dimensional table is a relation.

The smallest attribute in a two-dimensional table that uniquely identifies a tuple is called a key or code. The key that is selected from all the marquee keys to be used by the user is called the primary key. If an attribute in table A is a key for a table B, the set of attributes is said to be a foreign key or foreign code for A.

Data constraints in a relationship:

(1) Entity integrity constraints: constrains the attribute values in the primary key of a relationship not to be null values;

(2) Referential completeness constraints: a basic constraint between the relationships;

(3) User-defined integrity constraints: it reflects the semantic requirements of the data for the specific application.

4.3 Relational Algebra

One of the characteristics of a relational database system is that it is based on data theory, and there are a number of data theories that can represent the data operations of a relational model, the most famous of which are relational algebra and relational algorithms.

Basic operations of the relational model:

(1) Insertion (2) Deletion (3) Modification (4) Querying (including projection, selection, and Cartesian product operations)

4.4 Database Design and Management

Database design is the core of data applications.

Two approaches to database design:

(1) data-oriented: information needs-oriented, taking into account processing needs;

(2) process-oriented: processing needs-oriented, taking into account information needs.

The life cycle of the database: requirements analysis phase, conceptual design phase, logical design phase, physical design phase, coding phase, testing phase, operation phase, further modification phase.

Requirements analysis commonly used structural analysis methods and object-oriented methods. The structured analysis (SA for short) approach analyzes the system in a top-down, layer-by-layer decomposition. Data flow diagrams are used to express the relationship between data and processing. For database design, the data dictionary is the main result of detailed data collection and data analysis.

A data dictionary is a collection of data descriptions, including five parts: data items, data structures, data flow (either data items or data structures), data storage, and processing.

The purpose of database conceptual design is to analyze the intrinsic semantic relationships of data. There are two methods of design

(1) centralized schema design method (for small or not complex units or departments);

(2) view integration design method.

Design method: E-R model and view integration.

View design generally has three design sequences: top-down, bottom-up, inside-out.

Several types of conflicts for view integration: naming conflicts, conceptual conflicts, domain conflicts, and constraint conflicts.

Relational view design: the design of relational views is also known as outer schema design.

The main role of the relational view:

(1) to provide logical independence of data;

(2) to adapt to the different needs of the user's data;

(3) there is a certain degree of data confidentiality.

The main goal of the physical design of the database is to adjust the internal physical structure of the data and choose a reasonable access path to improve database access speed and effective use of storage space. In general, RDBMS leaves the user to participate in the physical design of the contents of the broad index design, integrated cluster design and partition design.

The content of database management:

(1) database set up;

(2) database adjustment;

(3) database reorganization;

(4) database security and integrity control;

(5) database failure recovery;

(6) database monitoring.