Collection - Sequence (Ordered)

Data System Architecture

About

A sequence is an abstract collection:

  • of non-unique element
  • where order matters - ie (A,B) is not equal to (B,A)

non-unique means that it allows duplicate member (the same element/value may occur more than once).

Order matter for equivalence Duplicate is allowed Collection Type
false false set
false true Bag
true false OrderedSet
true true Sequence

Example

  • (M, A, R, Y) is a sequence of letters with the letter M first and Y last.
  • (M, A, R, Y) differs from (A, R, M, Y)

Properties

Rank / Index

The position of an element in a sequence is its rank or index.

Cardinality

Collection - Cardinality (Size/Length) - In computer science

Finite

A finite sequence is called a list

Infinite

A infinite sequence is called a stream and is generally read through a iterator pattern.

Access type

It's a data structures with no or slow random access.

Documentation / Reference





Discover More
Data System Architecture
(Collection|Container) Data Type (Set, Bag, Sequence)

A collection is a abstract data type for grouping together multiple values. It's therefore sometime known as a container and creates a aggregation relationship A collection is: an object that groups...
Event Centric Thinking
(Stream|Pipe|Message Queue|Event Processing)

From an abstract point of view, a stream is a sequence of aninfinite cardinality (size) delivered at unknown time intervals. list Streams: are inputs and outputs of operations may be also buffers...
Data System Architecture
Collection - (Tuple|Vector|Row)

A tuple is: a finite list of elements (fields) - It can only contain a specific number of elements. ordered by position that may have different types. and still be completely typesafe. You can...
Data System Architecture
Collection - Array

An array is a collection with the sequence type. Array data structure
Card Puncher Data Processing
Design Pattern - (Iterator|Cursor)

An iterator is an interface that can express sequences of unlimited size, such as the range of integers between 0 and Infinity. It allow a user to loop over every element of a collection (container) while...
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...
Data System Architecture
How to generate data Just With Sql ?

data generation with just sql is based on then generation of integer sequence via recursive query Example: for mysql:
Data System Architecture
How to protect numerical Id ? (obfuscate, id encryption)

This page is how to obfuscate / protect a internal id. So that even if they are public, they cannot be guessed. This is mostly used to prevent guessing your data. For instance, you can estimate...
Data System Architecture
How to use the SQL ROW_NUMBER function?

ROW_NUMBER is an non-deterministic window function (analytic) that returns a sequence of unique numbers. With the row number, you can retrieve the following rows and create the follwing reports.: ...
Card Puncher Data Processing
IO - Random and Sequential Access

Random access (sometimes called direct access) is the ability to access an arbitrary element of a sequence in equal time. Random refers to the idea that any piece of data can be returned in a constant...



Share this page:
Follow us:
Task Runner