Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

In databases you might take about one-to-many. This means there's one thing that maps to zero or more others.

In this kind of style I'm looking for words that define min/max amounts of things. So far, I have:

        min     max
one      1       1
many     0    infinite
optional 0       1
???      1    infinite

Is there a single word that fits '???' to mean more than one?
Do you have better alternatives for 'optional'?

I'm wondering if there are any conventional names for those concepts?

share|improve this question

closed as primarily opinion-based by durron597, Snowman, GlenH7, Ixrec, gnat Aug 15 at 14:18

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

Can you give an example of where you'd use this? –  FrustratedWithFormsDesigner Jun 14 '13 at 16:06
Do you mean the case where there is at least 1 but potentially infinite number? atleast? –  Michael Jun 14 '13 at 16:12
@Michael - yes I do –  Scott Langham Jun 14 '13 at 16:19
@FrustratedWithFormsDesigner - It's for use as a keyword in a scripting language that allows you to define relationships between bits of data. –  Scott Langham Jun 14 '13 at 16:20
wouldn't "many" be min:2 max:infinite ? –  MetaFight Jun 14 '13 at 16:31

3 Answers 3

up vote 4 down vote accepted

I might do this:

  • ExactlyOne
  • ZeroOrMany
  • ZeroOrOne
  • AtLeastOne

Very generic, if I knew the exact context, I might choose something a little more appropriate.

share|improve this answer
ZeroOrMany -> ZeroOrMore ? –  paul Jun 14 '13 at 18:42
You're right, ZeroOrMany might imply NOT one. Perhaps just "Any" for that option. –  Neil N Jun 14 '13 at 19:27
Mm; One, Any, Optional, Some –  paul Jun 14 '13 at 19:58

I might use "nonzero" for your last relationship: "a Foo has a nonzero number of Bars."

(In pure mathematics, this might imply the possibility of a negative value, but in object relationships, that seems to be naturally excluded.)

share|improve this answer

The terminology for binary relations may be useful here. A binary relation ⊗ : 2^(X×Y) can be regarded as a multi-valued, partial function from X to Y. We then consider special cases of binary relations depending on how many Ys are associated to each X.

A left-total relation associates each element of the domain with at least one element of the range (min = 1). A partial relation may associate some elements of the domain with no elements of the range (min = 0).

A functional relation associates each element of the domain with at most one element of the range (max = 1). There's no term for a relation that is not functional.

A function is a left-total, functional relation.

Based on this, here is my keyword suggestion:

          min max
function   1   1
relation   0   ∞
partial    0   1 (abbreviation of "partial functional relation")
total      1   ∞ (abbreviation of "left-total relation")
share|improve this answer
This works, but it doesn't match standard database usage. Since it's for a custom scripting language, it is a valid answer, but I'd hate to have to try and remember it. –  Bobson Jun 14 '13 at 17:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.