2 relational database

Source: Internet
Author: User

Outline: A single data structure: Relationships

Two, relational operation: relational algebra language; relational calculus language; SQL

III. integrity constraints: Entities, references, user customizations

I. Integrity constraints

1. Entity integrity: The individual components of the main attribute cannot be null values

2. Referential integrity: The outer code is either empty or equal to the primary code value in the referenced relational table

3. User-defined Integrity

Second, relational algebra

A) Traditional set operations:

1. and

2. and

3. Poor

4. Generalized Cartesian product

(ii) Specialized relational operations

1. Select σ: The tuple of the approved conditions in the relationship R; σsage<20 (Student) selects sage<20 rows from Student

2. Projection π: Select several columns from the relationship R as a new relationship πsname,sdept (Student) Choose sname columns and sdept columns from Student as a new table

3. Connect ∞

1) General Connection

2) Equivalent connection

3) Natural Connection: You need to remove duplicates and speak the same part of the two groups

4. Difference ÷

2 relational 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.