Put another way, is it possible to have an aggregate constraint? For instance, if I wanted to have a maximum number of tags on a post or a maximum number of users in a group?
Imagine a post_tags join table with a post_id column and a tag_id column. How can I enforce that a given post_id only appears in this table a limited number of times, e.g., 5?