Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Database (http://www.go4expert.com/forums/database-forum/)
-   -   Entity relationship diagramming problem II. Please help. (http://www.go4expert.com/forums/entity-relationship-diagramming-ii-help-t18819/)

Assi9 5Aug2009 11:04

Entity relationship diagramming problem II. Please help.
 
Sorry to bother you again. I have come across another problem in this assignment of mine.

It is like this: There is the Student entity (Student_ID, First_name, etc), Module entity (Module_ID, Module_Name, etc.). Now I need to find some way to store the assessment results of the students in their respective modules.

You will notice that Student and Module have a many-to-many relationship, so I have introduced a weak entity to simplify this. It is called Student Module Registration. Now I'm tempted to create a new entity called Assessment and create a relationship betwen Assessment and Student and Module.

Problem is, Assessment does not seem to have any primary key and it seems to be just another weak entity, just like Student Module Registration. Is it possible for Student and Module to be related to another weak entity? What would be a better solution than this?

nimesh 6Aug2009 00:16

Re: Entity relationship diagramming problem II. Please help.
 
You could have a combination of columns as the primary key, in the Module Entity.
Like combination of StudentId and ModuleID, which would be unique.

What's the relation between Student, Module and Assessment?
Like 1 Student will have a particular Module only once, with only one assessment.
If so, then you can merge Module and assessment together.

:offtopic: If this problem was related to the same old you, you could have continued in the same thread, instead of creating a new one

Assi9 6Aug2009 15:04

Re: Entity relationship diagramming problem II. Please help.
 
Thanks again for replying, nimesh. You rule! And I'm really sorry to have created this new thread for the same problem. Won't happen again.

About the Student-Assessment relationship, a student has to choose 2 modules if part-time, and 4 modules if full-time. Can a combination of both Student_ID and Module_ID be used as candidate keys in the Assessment table in this case?

nimesh 6Aug2009 22:40

Re: Entity relationship diagramming problem II. Please help.
 
Quote:

Originally Posted by Assi9 (Post 54365)
a student has to choose 2 modules if part-time, and 4 modules if full-time

But can a student enroll for a particular module say XML twice?

Quote:

Originally Posted by Assi9 (Post 54365)
Can a combination of both Student_ID and Module_ID be used as candidate keys in the Assessment table in this case?

Will the assessment be carried out multiple times or once?
If multiple attempts, you can add one more key (along with Student_ID and Module_ID) to make the unique record criteria.

Quote:

Originally Posted by Assi9 (Post 54365)
You rule!

haha, I don't rule. Shabbir rules :)

Assi9 6Aug2009 23:24

Re: Entity relationship diagramming problem II. Please help.
 
Quote:

But can a student enroll for a particular module say XML twice?
No. A student may take four different modules, but according to the scenario, takes a module just once as modules are restricted to just the one programme they belong to and students enroll for just one programme. I think I'm getting your point. I should really try asking myself those questions. Kind of probing the database for answers. Thanks a lot for your help. You have single-handedly changed the way I usually tackle these questions. We are taught a much more orthodox way of analyzing a uod.

Quote:

haha, I don't rule. Shabbir rules
Oh, I'm sure he does. But that doesn't exclude the fact that you too rule! Thanks again for your help. Have a great day/night.

nimesh 7Aug2009 00:55

Re: Entity relationship diagramming problem II. Please help.
 
haha

yes, you yourself should frame such questions, get the answers, reanalyze the situation.
Whether these answer prompt you for more questions? :)

Others have not replied that does not mean I rule :)

This is what is my funda:
You should be clear at the basics. at the fundamentals.
then whatever language you create your programs in, or whatever database you choose. it doesn't matter.
if you your fundas and you know how to apply them, that's more than enough.
From net almost everything is available. softwares, tutorials, samples, forums to help you :)

Assi9 7Aug2009 11:20

Re: Entity relationship diagramming problem II. Please help.
 
Your tips definitely work. I am now normalizing my tables and most of them seem to be in the 2nd normal form already, and some even in the 3rd. You're right I should really be doing more research, and I would have, but they gave use just over a week to design this and there's a vb application to design and code as well. But I think I have them covered, and I have you to thank for the database assignment. Really you were great help. Thanks again. Have a nice day/night.


All times are GMT +5.5. The time now is 01:55.