According to the manual there are 4 types of ETS tables:
set
– The table is a set table: one key, one object, no order among objects. This is the default table type.ordered_set
– The table is a ordered_set table: one key, one object, ordered in Erlang term order, which is the order implied by the < and > operators. Tables of this type have a somewhat different behavior in some situations than tables of other types. Most notably, the ordered_set tables regard keys as equal when they compare equal, not only when they match. This means that to an ordered_set table, integer() 1 and float() 1.0 are regarded as equal. This also means that the key used to lookup an element not necessarily matches the key in the returned elements, if float()'s and integer()'s are mixed in keys of a table.bag
– The table is a bag table, which can have many objects, but only one instance of each object, per key.duplicate_bag
– The table is a duplicate_bag table, which can have many objects, including multiple copies of the same object, per key.
Though I don't really understand the differences between them from their descriptions. What are "objects" and "instances of objects" here?