Modeling database - Mailing list pgsql-novice

From Norton Glitz
Subject Modeling database
Date
Msg-id CA+hofyzGK1MbTFWYOPR3bDO+A2FqjPje9qZHVTp1aAO7XN=pFA@mail.gmail.com
Whole thread Raw
Responses Re: Modeling database  (James Keener <jim@jimkeener.com>)
List pgsql-novice
Hello,

In my site users will choose one subscription to have a certain amount of properties to advertise.

For example, if he bought a subscription with 5 ads, he can advertise 3 houses and 2 apartments.

The user can also modify the subscription, for like 10 ads. Now the same user can advertise 5 more properties. But he can also decrease the amount of ads, for example 2. But in this case he will have already more than 2 ads running.

Is there a way for everytime the subscription changes, if he has more ads than the subscription allows it just turn off the amount that is more than hired?

I'm not sure how to model this problem yet. Any answer would be awesome.

Thank you

pgsql-novice by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Password settings requirements
Next
From: James Keener
Date:
Subject: Re: Modeling database