1

I have a UML diagram of what I need my database schema to look like. This diagram includes roles and cardinality. How can I enforce cardinality in Postgres?

nix
  • 403
  • 1
  • 6
  • 15

1 Answers1

2

Cardinality is enforced by using constraints.

http://www.postgresql.org/docs/8.1/static/ddl-constraints.html

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
  • Could you please give me an example of such a constraint? – nix Jun 28 '10 at 19:00
  • What kind of cardinality are you trying to constrain? Range, uniqueness (another kind of range), or one-to-many joins? The link I provided has good examples of all three. – Robert Harvey Jun 28 '10 at 19:01