Take the following definition, to be called a Data View (DV):
- a DV is a rectangular data structure of N rows by M columns
- the first K columns are the key (K may be zero)
- there is a D flag which defines whether key duplicates are allowed
- the remaining R columns are the residue (R = M - K)
- DV's are lexicographically ordered on the first K columns
There are a number of cases, written as combinations of K, D, and R:
- (K=0,D=0,R=0) is a bool, it has 0 or 1 rows and no other data
- (K=0,D=1,R=0) is a count, i.e. one non-negative int, no other data
- (K=0,D=0,R>0) is a tuple, each column contains one value
- (K=0,D=1,R>0) is a list, i.e. an indexed collection of tuples
- (K>0,D=0,R=0) is a set, i.e. a unique collection of keys
- (K>0,D=1,R=0) is a bag, i.e. a set where items can occur more than once
- (K>0,D=0,R>0) is a map, i.e. a mapping from unique keys to values
- (K>0,D=1,R>0) is a table, i.e. an arbitrary collection of key/value tuples
As shorthand, "DV<KDR>" will be used, e.g. a "DV<01N>" is a list.