Cardinality in PostgreSQL
Asked Answered
T

1

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?

Tenpin answered 28/6, 2010 at 18:44 Comment(0)
N
2

Cardinality is enforced by using constraints.

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

Newmark answered 28/6, 2010 at 18:53 Comment(2)
Could you please give me an example of such a constraint?Tenpin
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.Newmark

© 2022 - 2024 — McMap. All rights reserved.