Database introduction, database

Source: Internet
Author: User

Database introduction, database

I have a certain understanding of this aspect of knowledge, but there is still some confusion. The first database I know is Access relational database, which is the most commonly used database on Microsoft Office to store data, I also had contact during the NCREs examination. After I learned the C ++ language and C # language, I learned that the C # language-based SQL Server is the strongest and most comprehensive relational database.

Database

A database is a collection of data stored in an organized manner. When people collect a large amount of data, they should be saved for further processing to further extract useful information. Nowadays, people use computer and database technologies to scientifically store a large amount of data to make better use of these data resources.

Database System

Database System (DBS) is a system composed of databases and management software. Database-related software systems and hardware are often referred to as database systems. A database system is a computer system that uses database technology. It consists of databases (data), database management systems (software), Database Administrators (personnel), and hardware platforms (hardware) and softwAre platfoRm (software) constitute the operational entity. Database administrators are professional administrators who plan, design, maintain, and monitor databases and play an important role in the database system.

Database architecture

The database has a rigorous architecture, which can effectively organize and manage data and improve the logical and physical independence of the database. The standard structure recognized in the database field is a three-level model structure.

Database three-level mode structure refers to the mode, external mode and internal mode.

Mode: A mode is also called a logical mode or conceptual mode. It describes the logical structure and features of all data in a database and is the public data view of all users. A database has only one mode, and the mode is in the intermediate layer of a three-level structure. When defining a schema, you must not only define the logical structure of the data, but also define the relationship between the data, and define data-related security and integrity requirements.

External mode: the external mode is also called the user mode. It is the logical structure and feature description of the local data used by database users (including application programmers and end users, it is the data view of database users and the logical representation of data related to an application. The external mode is a subset of the mode. A database can have multiple external modes. External mode is a powerful measure to ensure data security.

Internal Mode: the internal mode is also called the storage mode. A database has only one internal mode. It is the description of the physical structure and storage method of data, and the representation of data in the database.

Ing between three modes

In order to realize the connection and conversion between three abstract layers of the database within the system, the database management system provides two-layer ing between the three modes.

External mode/mode ing: the same mode can have any number of external modes. For each external mode, the database system has an external mode/mode ing. When the mode changes, the database administrator changes the external mode/mode ing so that the external mode remains unchanged. In this way, applications written based on the data external mode do not need to be modified, ensuring the logical independence of data and programs.

Mode/Internal Mode ing: the database only has one mode and internal mode, so the mode/Internal Mode ing is unique. It defines the ing between the global logical structure of the database and the storage structure. When the storage structure of the database changes, the database administrator changes the ing between the modes and internal modes, so that the modes remain unchanged and the applications do not change accordingly. This ensures the physical independence of data and programs.

Data Model

Data Model is a form of abstraction of objective things. It abstracts objective things and uses computers to process specific things in the real world. It objectively reflects the real world and is easy to understand. It is consistent with people's understanding of external things.

The data model is the core and basis of the database system. It is a combination of conceptual tools that describe the relationship between data, data semantics, and Data Consistency constraints. A Data Model consists of three parts: data structure, data operation, and integrity constraint.

Data Structure: it is a description of the static features of the system. The description object includes the data type, content, nature, and the relationship between the data.

Data operation: Describes the dynamic features of the system and operations on various object instances in the database.

Integrity constraints: a set of integrity rules. It defines the constraints and dependency rules for the data and its relationships in a given data model.

Common Data Models

Hierarchical Model: a data model that uses a tree structure to represent object types and object relationships is called a hierarchical model. It has the following characteristics: each tree has only one parent-child node, and is called a root node; all nodes except the root node in the tree have only one parent node.

Mesh model: a data model that uses a directed graph structure to represent the relationship between entities and entities is called a mesh model. Compiling applications with a mesh model is extremely complex and Data independence is poor.

Relational Model: describes the data in the tables Table. In the relational model, each table has multiple field columns and record rows, and each field column has fixed attributes (numbers, characters, dates, and so on ). The data structure of the relational model is simple, clear, and highly independent. Therefore, it is a mainstream database data model.

Basic Terms of the relational model

Link: a two-dimensional table is a link.

Tuples: a row in the orders table, that is, a record in the table.

Attribute: a column in the values table, which is expressed by the type and value.

Field: The change range of each attribute value.

Data constraints of the relational data model:

Entity Integrity Constraint: the attribute value of the primary key of the constraint relationship cannot be null.

Integrity constraints: basic constraints between links.

User-Defined Integrity Constraint: it reflects the semantic requirements of data in a specific application.

Standardization of relational databases

According to the Standardization Theory of relational databases, every link in a relational database must meet certain standards. According to the different conditions that meet the specifications, there can be five levels: 1NF and 2NF... 5NF ). NF is short for Normal Form. Generally, data can be standardized to the third paradigm standard.

First paradigm: In a relationship, duplicate fields are eliminated, and each field is the smallest logical storage unit.

Second paradigm: If the relational model belongs to the first paradigm, each non-primary key field in the relationship must be completely dependent on the primary key field, not only part of the primary key field.

Third paradigm: If the relational model belongs to the first paradigm, all non-primary key fields in the relationship only depend on the primary key fields. The third paradigm requires removing transmission dependencies.

Relational Database Design Principles

1. The data organization of data files in the database should obtain the maximum share and minimum redundancy, and eliminate the redundant part of the data and data dependency, effectively separate data dependent on the same data model.

2. ensure data consistency and correctness during input and modification.

3. Ensure high independence between data and the application that uses data.

Entities and relationships

One-to-one relationship: A record in Table A does have only one matching record in table B. In a one-to-one relationship, most of the relevant information is in a table.

One-to-multiple relationship: the rows in Table A can have many matching rows in Table B, but the rows in Table B can only have one matching row in table.

Multi-to-many relationship: the rows in each table in the Link have multiple matching rows in the relevant table. In databases, the creation of many-to-many relationships relies on 3rd tables (called connection tables). The connection table contains the primary key columns of the two tables, then, create the relationship between the primary key columns of the two related tables and the matching columns in the connection table.

Common relational databases

Relational Database is a database built on the relational database model. It processes data through concepts and methods such as set algebra.

Access Database

Microsoft Accesss is one of the popular relational database management systems. Its core is the Microsoft Jet Database Engine. Generally, the default installation is selected when Microsoft Office is installed, and the Access database is installed on the computer. Microsoft Accesss is a very easy-to-master database management system that allows you to create, modify, and maintain data in databases and databases. You can also use the Wizard to complete a series of database operations.

SQL Server 2008

The SQL Server database series has been upgraded to SQL Server 2008 many times. It is the strongest and most comprehensive version to date. The database I have learned is like this. I will introduce it in detail in my blog and will not explain it too much here.

Oracle Database

Oracle is a group of software products centered on distributed databases. Oracle is the most widely used relational database in the world. It has a complete data management function, including a large amount of data, data persistence, data sharing, and data reliability. Oracle provides good performance in parallel processing, real-time processing, and data processing speed. Generally, large enterprises use Oracle as the backend database to process massive data.

 

Related Article

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.