Introduction to Database Systems | relational database

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_43145926/article/details/94402882

Several concepts

  • Cartesian product: one kind of set operations on the domain https://blog.csdn.net/wx13227855087/article/details/82704184
  • Domain: a collection of the same data type.
  • Relationship: Unable to accumulate data with Descartes, because a lot of tuples meaningless, meaningful out of it known as a tuple relations. So the relationship <Cartesian product. Relationship is a limited subset of the Cartesian product.
  • Candidate code: a relation attribute uniquely identifies a set of tuples, but not a subset. If there are a plurality of candidate code relationship, wherein a code is selected based. Attribute candidate code called primary properties, properties not included in the candidate code in the code is called non-primary property or properties. If the candidate code contains all the attributes, it is called the full code.
  • There are three types of relations: basic relationship (base table, group table), a lookup table, the table view.
  • Mode is the type of relationship, the relationship is the value.
  • Relational Database: A collection of a bunch of tables

Relational Operations

  • Basic relational operations: result of the operation objects are set and
    query: select, projection, is connected, in addition, and, cross, cross, Cartesian product
    insert, delete, modify operation

Relational integrity

  • Entity integrity: If A is the primary attribute property substantially relation R, then A can not take a null value (null), i.e. do not know / values ​​/ absence meaningless.
  • Referential integrity: If the attribute (set) F R is the basic relationship of the outer code, and the master key K which substantially corresponds to the relationship S (basic relations R and S are not necessarily different relationships), the element for each of R group on the F value must be 1 or a null value (F value of each attribute are null) 2, or a value equal to the master key S of tuples.
  • User-defined integrity: constraints for a specific database.

Relational algebra

Guess you like

Origin blog.csdn.net/qq_43145926/article/details/94402882