限制(关系)
限制 | |
---|---|
术语名称 | 限制 |
英语名称 | restriction |
限制(restriction)指取一个关系,仅取其中涉及原前后域的一个子集的元素,所构成的关系。
定义
限制 | |
---|---|
运算名称 | 限制 |
运算符号 | [math]\displaystyle{ \bullet_{| \bullet} }[/math] |
Latex | |
运算对象 | 关系 |
运算元数 | 2 |
运算结果 | 关系
|
对集合 [math]\displaystyle{ X }[/math] 上的关系 [math]\displaystyle{ R }[/math] 与 [math]\displaystyle{ X }[/math] 的子集 [math]\displaystyle{ A }[/math] ,记集合 [math]\displaystyle{ R_{| A} = \left\{ \langle x, y \rangle \in R \mid x, y \in A \right\} }[/math] ,称为 [math]\displaystyle{ R }[/math] 在 [math]\displaystyle{ A }[/math] 上的限制(restriction),有时也直接记作 [math]\displaystyle{ R|A }[/math]。
类似地,也有仅限制前域或后域的情况,相对少见。对 [math]\displaystyle{ X }[/math] 到 [math]\displaystyle{ Y }[/math] 上的 [math]\displaystyle{ R }[/math] 分别限制到 [math]\displaystyle{ A\subseteq X }[/math] 和 [math]\displaystyle{ B\subseteq Y }[/math] 的情况,分别记作 [math]\displaystyle{ R_{|A} }[/math] 和 [math]\displaystyle{ R^{|B} }[/math] 。
性质
关系的限制的关系矩阵相当于原矩阵去掉部分序号对应的行、列。