quota

  
how can I set a quota to the user and show how much space he is using inside the database ?  For instance, the user can use the application and stop when he/she reaches 10 MB inside the database. During the time he is using the application a gauge shows the space used and available.
Someone can help me ?
The only way this could be done in my opinion is if this was a multitenant application.  This would allow complete isolation of the data for a given set of users, in this case one user.  Using multitenant assumes that the application is identical for all users, that all data is completely independent from other user's data and you would have to set up a new tenant ID whenever a new user wants to use the application.

Once you had that all working, you'd have to examine each record in each table to determine how many bytes a record is.  Since any text field can have a value of zero to the maximum field size you can't just use all the maximums.  You'd have to write code to read each record and get the actual lengths of every field.  Ideally you would do this anytime a record is added or updated and put that value in an additional field called RECORDSIZE.  You could then add up all the RECORDSIZE values for all the records to produce the dashboard.

But, here's the problem.  Even if you did all that work, the results you get won't be 100% accurate.  Do you count for static table values, images, code, etc?  I would strongly suggest rethinking how you could impose limits.  My first initial thought is just limiting a user by record count in whatever tables you care about.  Depending on the application I'm sure there are other ways limits could be imposed without so much coding effort.

Hope this helps,
Curt

Curt,
  isn't there a way to database software provide the space used ? Maybe a specific command?  Regarding the multitenant this can be a easier option, what do you think about that ? 
Luciano, the platform connects to the database using a single user, that is configured when you install the platform. It has no way of knowing that there are multiple "users" using your system, as they exist only as entities in tables. Also, databases are not like file systems, in that they have a precise knowledge on the size of records etc., as e.g. reindexing or compressing (as a maintenance task) etc. can change this drastically. Basically I think you want something that is just not possible.
Well,
  runrunit is selling its product based on space available. Thinking now, I imagine they are creating a machine for each client... what do you think Kilian ?  Below the link to check it 
https://secure.runrun.it/en-US/plans_and_pricing
I think the idea is the same for OutSystems, we have only 1 GB available for each environment

Yes, I would think they create a single virtual machine, or otherwise a single catalogue, that they can limit in size.
I'm sure that's exactly what they are doing, providing a multi-tenant environment, as I described earlier.