-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: User limits creating quota restrictions with hibernate
PostPosted: Sun Aug 11, 2013 2:45 am 
Newbie

Joined: Sun Aug 11, 2013 2:00 am
Posts: 3
Good day/night to all of you.

In our university project we have a database created by hibernate (using postgresql) having 17 tables(obejct). We need to post a limit to 4 object i.e. student_comments, student_attachments, student_drafts, student_fotos

1) limit number of comments posted by the student to 1000 per student and their combine size in the database should not exceed 40 MB.
2) limit student_attachments to maximum of 120 MB per student i.e. students can post any number of attachments but their combine size should not exceed 120 MB of space.
3) same restriction as studnet_attachments object, but their combine size should be limited to 80 MB
4) the same but limit should be 50 MB per student.

in case one of this restriction is reached we would like to disable that students account.

The student_comments are stored as

@Lob
public String comment;

and the attachments, fotos and drafts are stored as

private byte[] data;

Unfortunately my professor said that he might want to change the limits in the future so we need to code those limits in a way that they could be later easily changed i.e. increased.

This question is addressing the best practise’s used, i.e what would be the best solution to our problem using hibernate and postgresql?

Regards,

K


PS: I have posted this topic in the general discussion as i do not know where to begin searching. Thank you in advanced.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.