Typically, when platforms wish to provide database resource to user (developer) for programs development, they will use limit database access APIs to limit actions from the application, to be able to enforce some constraints on assets occupied, a good example is social API.
It is possible to same manner that people can use and employ in database layer, nor application layer. If then, we simply need to assign database quota for specific user and let database handle the resource usage. In addition, it's easier to possess some programming APIs from database server to aid this.
I discovered some similar questions, as follow:
- Oracle [might has]: Is there a way to throttle or limit resources used by a user in Oracle?
- MySQL [no]: http://serverfault.com/questions/124158/throttle-or-limit-resources-used-by-a-user-in-a-database
- SQL Server [unsure]: Databases with utilization constraints
Since i have am concentrate on free solutions, what about PostgreSQL or NoSQL? As free database, I believe PostgreSQL compares better more positively with Oracle.
In PostgreSQL you are able to set defaults per role such as this:
ALTER ROLE mikey SET work_mem = '32MB';
This setting is permanent. (You may also set most parameters per session or per transaction.) You are able to set most configuration parameters except in which the manual states otherwise.
If by assets you mean disc space, I've no solution from the top my mind.
The amount of queries that the account can problem each hour
The amount of updates that the account can problem each hour
The amount of occasions a free account can connect with the server each hour
The amount of synchronised connections towards the server by a free account
For postgres, their wiki states:
PostgreSQL doesn't have facilities to limit what assets a specific user, query, or database consumes, or correspondingly to create focal points such that certain user/query/database will get more assets than the others. It's essential to use operating-system facilities to attain what limited prioritization can be done.
However the question in my experience is really -- whichever database can be used -- what's the expectation whenever a user surpasses their limits? When the database makes sure limits, should queries beyond individuals limits simply return a mistake and make the application to fail? I'd suspect this may have unpredicted negative impacts around the programs. It's difficult to express what's going to happen when all of a sudden the database begins coming back errors.