-->
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: how to generate the fact table based on the relation below
PostPosted: Tue Mar 03, 2015 6:11 am 
Newbie

Joined: Tue Mar 03, 2015 3:53 am
Posts: 1
three entity : student ,teacher,task
relationship: teacher to student , one to many; teacher to task,many to many
the business process is sample,like this:

first, every student must have a teacher, this is easy to be done with hibernate
student_id teacher_id
student_a teacher_a
stundet_b teacher_a
stundet_c teacher_b

then teacher need to publish a task,and add a score to the task ,this can be done by create a middle table entity with hibernate,alao can be done easily
teacher_id task_id score
teacher_a task_a 10
teacher_a task_b 5
teacher_b task_a 6

finally,the student must finish the task their teacher publish, because what task student should do is actually decided by those two relationship above,now need a fact table to record the progress of each task belong to student,like this:
student_id teacher_id task_id score progress
student_a teacher_a task_a 10 75%
student_a teacher_a task_b 5 10%
student_b teacher_a task_a 10 22%
student_b teacher_a task_b 5 11%
student_c teacher_b task_a 6 7%

now the problem is coming, I don't know how to create this fact table use hibernate,the solution I hope that is once I make sure the relationship,this fact table can be generated autolly,I was a new learner of hibernate,please give me the core and explain as detailier as possible,thanks


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.