Ordinal Data - Comparison Operator (Order, Equality)

Data System Architecture


A comparison operator is a class of operators that model:

A comparison operator test the order relationship between two operands and returns a Boolean.

The result of a comparison is a Boolean



Comparison Operator are tiddly coupled:

in order to sort data.

Condition / Filter

Comparison Operator are used in predicate (condition) in order to filter


Order of precedence

order of precedence - All comparison operators have the same priority, which is lower than that of all operator mathematical operators


Comparisons may be chained.

For example, a < b == c tests whether:

  • a < b
  • and moreover b == c


Comparisons may be combined using the Boolean operators and and or to from a predicate (boolean expression)


Comparison operator models two kind of relation:

Binary relation are used in many branches of mathematics to model this relation. See Logical Data Modeling - Binary Relation.


Order relation, including strict orders:

Operation Description
< strictly less than
<= less than or equal
> strictly greater than
>= greater than or equal
in check whether a value occurs in a list
not in check whether a value does not occur in a list


The equal operators model an equivalence relationship

Documentation / Reference

Discover More
Bash Liste Des Attaques Ovh
Bash - Conditional Expression

A predicate or boolean expression is known in Bash as a Conditional Expression. It is a command that returns an exit status of 0 or 1. The conditional expression is part of the compound expression. ...
Bash Liste Des Attaques Ovh
Bash - Integer

This article is the management of integer in bash. See See The ordinal comparison operator in Bash are: Double Bracket operator Single Bracket Operator Example -lt -lt [[ 8 -lt 9 ]] && echo "8 is less than 9"...
Booelan Logic Hair
Boolean - (Logical) Operator (OR, AND, XOR, )

Boolean operator manipultes truthy and falsy values that can come from: a Boolean value the interpretation of a non-boolean value (ie javascript (truthy/falsy)) or the result of a comparison expression....
Data System Architecture
Boolean - Predicate (Boolean Expression, Condition)

A Predicate is an boolean expression that evaluates to: TRUE, FALSE, or UNKNOWN. A predicate acts as a filter that filters a certain number of element from a collection (set) where: ...
Z80 Registers
CPU Register - Control registers

Control registers: instruction pointer register (32-bit) flags register (32-bit) to perform: comparisons mathematical calculations flow implementation by changing the status of flags (conditional...
Data System Architecture
Collation - String comparison

Collation is a general term for the process and function of determining the sorting order of strings of characters (or in other term, how a strings comparison is performed) Collation implementations must...
Cpu Moore Law Transistor
Computer Architecture - Arithmetic logic unit (ALU)

The ALU is a component of a CPU. It is a device that executes all arithmetic and logical operations. In most arithmetic logic unit (ALU) hardware, we find a fixed-precision arithmetic found , which...
Data System Architecture
Data Type - Boolean

A Boolean is a primitive data type and may be implemented with: only two state: true or false 1 or 0 and an optional third one It's therefore almost always implemented on a computer level with...
Model Funny
Function - Binary Function/Operation

A binary operation is an scalar operation with two arguments (arity of two) that produces one value. They are creating a binary relation. the addition operator, the multiplication operator ...
Data System Architecture
Function - Order

Ordering is the process of finding the position of an element of ordinal data type in a sequence. Order and Equivalence are a special kind of binary relation (ie relation between two entities) With the...

Share this page:
Follow us:
Task Runner