reset password
Author Message
Gayaneh
Posts: 40
Posted 12:14 Oct 14, 2012 |

Hi Dr. Sun,

I have a question about modeling : Shall we consider project assignment to more than one group for each project?  If yes, is this true for the same year of project listing or it doesn't matter? Thank you.

cysun
Posts: 2935
Posted 13:13 Oct 14, 2012 |

We'll only consider one project for one group.

Gayaneh
Posts: 40
Posted 14:01 Oct 14, 2012 |

Two more questions:

1)Do we have to relate each Project to one specific Course?

2) If the project listing is going to be by year, then shall we extract the year from quarter? As courses (or projects, if they has to be related) are being offered quarterly?

Thank you.

cysun
Posts: 2935
Posted 14:50 Oct 14, 2012 |
Gayaneh wrote:

Two more questions:

1)Do we have to relate each Project to one specific Course?

2) If the project listing is going to be by year, then shall we extract the year from quarter? As courses (or projects, if they has to be related) are being offered quarterly?

Thank you.

1) No.

2) No. You can assume that year will be entered together with other information when a project is created.

Gayaneh
Posts: 40
Posted 19:03 Oct 14, 2012 |

Dr. Sun,

As I understood, you don't want us to make this complicated... however I need your confirmation if this is correct (which I assume it is...)

We assume each student takes just one project... not many... (Relationship between project_assignment (or group) and student is OneToOne)

Thank you again...

cysun
Posts: 2935
Posted 20:29 Oct 14, 2012 |
Gayaneh wrote:

Dr. Sun,

As I understood, you don't want us to make this complicated... however I need your confirmation if this is correct (which I assume it is...)

We assume each student takes just one project... not many... (Relationship between project_assignment (or group) and student is OneToOne)

Thank you again...

Yes, one student works on only one project, though each project may have several students.

BelknapKristine
Posts: 9
Posted 11:33 Oct 17, 2012 |

Hi Dr. Sun,
I have a similar question regarding the advisors...

Am I correct in assuming that the relationship between projects and advisors is Many-to-Many?
In my version of csns.ddl generated by Hbm2ddl, it has the advisors_id set unique in addition to the project_id and advisors_id pairs. With the constraint that the advisors_id must be unique, it would only allow each advisor to have one project just like the students. I’m not sure why Hbm2ddl adds the constraint that students_id and advisors_id be unique and while that is helpful for projectStudents, I don’t know how to stop it from doing that for projectAdvisors.

Kristine Belknap

cysun
Posts: 2935
Posted 13:02 Oct 17, 2012 |

Am I correct in assuming that the relationship between projects and advisors is Many-to-Many?

Yes.

In my version of csns.ddl generated by Hbm2ddl, it has the advisors_id set unique in addition to the project_id and advisors_id pairs. ...

That's probably incorrect - as you noticed, it would prevent an advisor from advising more than one project. You can do a search on CSNS2 for the annotation @ManyToMany (in Eclipse, select the project, then select File Search from the Search menu) to see some many-to-many mapping examples.