Relational database system

Source: Internet
Author: User
Tags join table name most popular database

The application of relational database system began in the 1980s, so far it has become the most popular database system. In a relational database system, the data in its database is logically organized based on the relationship. A relational database is composed of several relationships (i.e., two-dimensional tables). These relationships are often referred to as relational tables in relational database systems. In a relational database system, each relational table in its database can be described by the data Description language. This description typically consists of two sections that describe the relationship table itself and the collection of attributes contained in the relational table.

In order to access each relational table in the database, an operational language based on the relational data model must be provided. From a relational point of view, the operation of the relation, in theory, is the operation of the set, and the sum of the various operations and operations of the relationship is the relational algebra, which has been playing an important role in the development and research of the relational data manipulation language since the 1970s when the relational algebra was proposed. Here, we focus on relational algebra operations that are closely related to the operation of relational database data. They are selection, projection, and connection.

1. Select operation (Selection)

The selection operation is a set of relations as a tuple, from which the result of the calculation is a new relationship, which satisfies a certain requirement. Simply put, select the rows of the relational table to make a new relational table from the rows that meet certain requirements. The selection operation can be expressed as:

Select < relational table name > where < select Condition >.

2. Projection operation (projection)

The projection operation is a set of basic attributes constituting a relationship, from which some basic attribute sets are selected and another relationship is reconstructed, so the result of the calculation is also a new relationship. To put it simply, select the columns of the relational table and select several columns to form a new relational table. The projection operation can be represented as: This article comes from the Programming primer network

Project < relational table name > on < property name >.

3. Connection operation (join)

The connection operation is the operation of two relationships, from all the basic attributes of the two relationships, select the set of basic attributes satisfying certain requirements, reconstruct a new relationship, so the result of the operation is also a new relationship. Simply put, the rows of two relational tables are merged to select rows that meet the requirements of the column and form a new relational table. A connection operation can be expressed as:

Join < relational table names 1> and < relational table names 2> Where < join conditions >.

Selection operation, projection operation and connection operation are the most basic data operation operations in relational algebra, which lays a foundation for the operation language of relational database system. Whether to retrieve the data which satisfies the condition, the retrieval process involves several relations (tables), which can be realized by using these three operations, thus ensuring the completeness of the database. At present, the data manipulation language of the relational database is actually constructed based on these three relational algebra operations.

Back to the database basics ABC Directory

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.