UML beginner diagram

56 views
Skip to first unread message

MARKERPED

unread,
Mar 8, 2012, 1:18:07 PM3/8/12
to umlf...@googlegroups.com
Dear all

I am trying to create a UML Diagram to answer a set of questions. As a beginner I used a software that is not for this (powerpoint) however I am interested on having a good structure.
I pretend to import this excel file to posgre DB following the UML diagram.
I am wondering if it is possible to answer all those questions after import the excel tables as described by the UML?

Cheers

Mar

modelo_tentativa_ing.ppt
escolas.xlsx

H. S. Lahman

unread,
Mar 9, 2012, 1:14:18 PM3/9/12
to umlf...@googlegroups.com
Responding to MARKERPED....

Ordinarily my response would be that these forums are not here to solve
homework problems from school course work. However, there are some
mitigating circumstances. It is curious the problem is clearly set in
the UK, but the model is solving it using a different language than
English. So something might be getting lost in translation. The problem
is also rather complex, suggesting it is more like a term project than
an ordinary homework problem. As such the design logic will be more
complicated. Most important, you already did the work of providing a
solution and are asking whether it will work rather than whether it is
the best one. So...

>
> I am trying to create a UML Diagram to answer a set of questions. As
> a beginner I used a software that is not for this (powerpoint) however
> I am interested on having a good structure.
> I pretend to import this excel file to posgre DB following the UML
> diagram.

I think we need a clarification of what problem you are trying to solve
and what the attachments are intended to represent. Do you mean that
the Excel data would already be in the DB and the software problem would
be to answer the questions in the text slide by reading the DB?

Or is the software problem to convert the Excel data into DB tables that
would easily allow answering the questions in the text slide? (The Excel
data is not in proper Normal Form for a direct 1:1 import into a DB;
referential attributes are missing.)

Or both?

These are quite different problems and would require different
solutions. So before critiquing your model, we need to know exactly what
the problem is.

In addition to these general questions, I have some detailed questions
about your model...

What is "The Geom"?

Why are there no relationships to the University and Motorway entities?

What is the "DfE code"? I suspect it will be a table key in the DB, in
which case it is important to understand its semantics.

What is a "Department" in the text slide? How are these related to DfE
Code / School Name and District in the Excel data?

What do the numbers under the course codes in the Students tab mean? The
tab title suggest that they represent some sort of "origin". But origin
of what?

I also have a couple of comments...

The last four questions on the text slide cannot be answered from the
data in the Excel spreadsheet. There are no distances, no mention of
Birmingham, no mention of M62, and no indication of previous student
registrations in the Excel data.

Your Students Origin By Course entity seems to be identified as as
association class. However, association classes qualify relationships,
not entities and there is no indication of what relationship it
qualifies. Were trying to reify a *:* association into two 1:* associations?

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared.

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html

malcolmm

unread,
Mar 10, 2012, 10:28:45 AM3/10/12
to UML Forum
So the big question is where "The Geom" comes from. This isn't an UML
primitive type. Are you meaning to use an existing geometry model in
your model? Ideally, you'd implement this using the geometry types
from your database MySQL, Postgres, Oracle, so you'd want to model
these features in UML so you can use them in your model. If you're
not going to use a 3rd party tool for geometry, then you have a lot
more work to do.

Anybody have a UML model for that he can use? To me this is actually
a big deal. If you've got to model 3rd party tools and libraries
before you can use them in your model, then we've actually made a lot
of work for everyone, when the point of these 3rd party tools is to be
easy to reuse.

At first glance, a database model based on this UML diagram would be
able to answer the questions posed.

I didn't see the motorways in the excel file. That's a polyline, so
requires a more complex datatype. All these questions are easily
phrased in any SQL variant with geometry type support. Otherwise,
you'll have to define some basic geometry types and operations on the
needed for your questions.

MARKERPED

unread,
Mar 11, 2012, 10:03:12 AM3/11/12
to umlf...@googlegroups.com
Dear all,

Sincerely, I did not mean to upset anyone with the challenge. What is a challenge for me maybe is easy for one of you... and I am not requesting to someone to do this for me, I am just asking critical analysis of what I tried to do, and a suggestion of how to improve it (if needed).
Well I want to create those tables in postgre. and yes I will use postgis for the geometric features. the_geom is the default name given by postgre/postgis for geometric features.
I just wanted to be sure that I will be able to answer the questions using this structure. Mainly my doubt is the many to many relationship that exist between the courses contacts and schools... to solve this I created the Students origin by course (which also exist in the excel file), but I am not really sure about *.* 1.* etc. and it is here that I need a hand.

best regards,
Mar

Simon Wright

unread,
Mar 11, 2012, 12:34:33 PM3/11/12
to umlf...@googlegroups.com
I’d say you’re pretty nearly right. However, as HS says, there’s a proper notation for showing an AssociationClass, which I’m distressed to find is not readily findable on the Web via Google; and there are a lot of people who disapprove of them, and end up with a diagram rather like yours. Note, your class design will work, it’s just that I don’t think it’s the best, because it obscures the actual multiplicities between the main classes (School and Course).

I’d say that your association is something like
  School was-origin-of-students-on 0..* Courses
  Course has-been-attended-by-students-from 0..* Schools
(I think 0..* is right; what happens if there’s a new Course? a new School?)

This association then needs to be an AssociationClass, with attributes as you have them.

--S

H. S. Lahman

unread,
Mar 11, 2012, 11:33:00 AM3/11/12
to umlf...@googlegroups.com
Responding to MARKERPED....

I sent this message a couple of days ago. I don't know where it went...

Ordinarily my response would be that these forums are not here to solve
homework problems from school course work. However, there are some
mitigating circumstances. It is curious the problem is clearly set in
the UK, but the model is solving it using a different language than
English. So something might be getting lost in translation. The problem
is also rather complex, suggesting it is more like a term project than
an ordinary homework problem. As such the design logic will be more
complicated. Most important, you already did the work of providing a
solution and are asking whether it will work rather than whether it is
the best one. So...

>


> I am trying to create a UML Diagram to answer a set of questions. As a
> beginner I used a software that is not for this (powerpoint) however I
> am interested on having a good structure.
> I pretend to import this excel file to posgre DB following the UML
> diagram.

I think we need a clarification of what problem you are trying to solve

PMar Kers

unread,
Mar 13, 2012, 3:16:27 AM3/13/12
to umlf...@googlegroups.com
Dear all,

the_Geom is the geometric attribute of the table, which will be used for spatial analysis and to answer the geographic/spatial questions.
The relationships to the university and motorway entities are spatial therefore I will use GIS queries for answering the  geographic/spatial questions .
the dfe code it is just numeric - a number per entity (no repetition)
the department (is on the top of the second excel sheet - "courses" ) the dfe code relates the sheet students with the sheet schools ... the district is extracted by spatial analysis (but yes I should include it in the diagram)
under the course codes are the number of students from a specific school, and which course  they are. that's why the table should be something like I put in the diagram.

 
The last four questions on the text slide cannot be answered from the data in the Excel spreadsheet. There are no distances, no mention of Birmingham, no mention of M62, and no indication of previous student registrations in the Excel data. I suppose that the previous should be the actual registrations in the excel data.

Your Students Origin By Course entity seems to be identified as as association class. However, association classes qualify relationships, not entities and there is no indication of what relationship it qualifies. Were trying to reify a *:* association into two 1:* associations? Yes I am trying but not really sure if I am doing correctly. but like Simon Wright wrote: "(I think 0..* is right; what happens if there’s a new Course? a new School?)" The truth is that I had almost for sure the diagram was correct except for this class and its relationships - and it is here that I need help.

Best regards,
Mar




--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to
umlforum+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/umlforum?hl=en?hl=en

H. S. Lahman

unread,
Mar 13, 2012, 11:36:02 AM3/13/12
to umlf...@googlegroups.com
Responding to Wright...

> However, as HS says,

I'm curious. You actually saw this? I sent that message twice and I
never got an echo. Has the forum suddenly decided not to echo messages
back to the sender?

Simon Wright

unread,
Mar 14, 2012, 7:18:29 AM3/14/12
to umlf...@googlegroups.com
To H.S.: My membership of this group is set to ‘no email’, and I get notification of postings via RSS <feed://groups.google.com/group/umlforum/feed/rss_v2_0_msgs.xml>; both of your responses to MARKERPED showed up there and are visible in the new Google Groups view.

--S

H. S. Lahman

unread,
Mar 14, 2012, 3:02:47 PM3/14/12
to umlf...@googlegroups.com
Responding to Kers...

the_Geom is the geometric attribute of the table, which will be used for spatial analysis and to answer the geographic/spatial questions.
The relationships to the university and motorway entities are spatial therefore I will use GIS queries for answering the� geographic/spatial questions�.
the dfe code it is just numeric - a number per entity (no repetition)
the department (is on the top of the second excel sheet - "courses" ) the dfe code relates the sheet students with the sheet schools ... the district is extracted by spatial analysis (but yes I should include it in the diagram)
under the course codes are the number of students from a specific school, and which course �they are. that's why the table should be something like I put in the diagram.

I still have a real problem with understanding what it is you want to model. This seems to be some hodge-podge of realized (e.g. GIS software), database, and some software you are trying to design. The boundaries between realized code, Data Modeling, and OOA/D application modeling are not clear.

For example, will the software you are designing generate GIS queries to some GIS DBMS system? Or will they be manually generated outside your software? Or will they be "canned" queries provided in external parametric data that will be submitted by your software?

However, if your only question is about the association object, then...


�
The last four questions on the text slide cannot be answered from the data in the Excel spreadsheet. There are no distances, no mention of Birmingham, no mention of M62, and no indication of previous student registrations in the Excel data.�I suppose that the previous should be the actual registrations in the excel data.

Your Students Origin By Course entity seems to be identified as as association class. However, association classes qualify relationships, not entities and there is no indication of what relationship it qualifies. Were trying to reify a *:* association into two 1:* associations?�Yes I am trying but not really sure if I am doing correctly. but like Simon Wright wrote: "(I think 0..* is right; what happens if there�s a new Course? a new School?)" The truth is that I had almost for sure the diagram was correct except for this class and its relationships - and it is here that I need help.

Unfortunately, the reification through [StudentsOriginByCourse] doesn't really solve the problem because you are still eleft with a *:* relationship to [CourseContacts]. Typically reification is used to reduce a single *:* association to two 1:* or 1:1 associations. Thus (ignoring conditionality)...

<pre>
��������������� [StudentsOriginByCourse]
�������������������������� |
�������� * �� ������������ |���������������� *
[School] ------------------------------------- [CourseContacts]

might go to any of the following reifications:

�������� 1�������� 1 ������������������������� 1������������ *
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


�������� 1�������� 1�������������������������� *������������ 1
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


�������� 1�������� *�������������������������� 1������������ 1
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


�������� 1 ������� * ������������������������� 1������������ *
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


�������� 1�������� * ������������������������� *������������ 1
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


�������� * ������� 1�������������������������� 1 ����������� 1
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


�������� * ������� 1�������������������������� *������������ 1
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


�������� * ������� 1�������������������������� 1 ����������� *
[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]

</pre>

In practice most of these will make no sense in the problem space for most *:* situations. The 1st, 4th, and 5th tend to be the most common. In your case I would guess the 1st would be appropriate as each school would likely have its own collection of courses (i.e., its own syllabus of offered courses).

However, that would not work if the same courses are offered by different schools. Then the 5th reification can work where each school has lots of courses and each course is offered by multiple schools. The problem with that is the semantics of [StudentsOriginsByCourse]. Essentially this says that the students taking the courses are various schools define the relationship. The problem with that is that students can take more than one course and you are back to a *:* association on the right side.

Now there is very clearly a relationship in the problem space between schools and courses and probably either the 1st or 5th reification pattern can resolve it. But for that to be true, the association entity needs a semantics that is not about student participation. Instead, its semantics needs to be something like [SchoolSyllabus]. Then if you want to model where students fit in, you would need another [Student] entity with its own set of peer relationships to [School] and [CourseContact].

While we are on problem space semantics, a contact for a course is probably a different entity in the problem space than the course itself. Courses are related to schools to schools via syllabus. Students are related to courses via registration. Contacts are related to courses via faculty assignments. IOW, you need to model the problem space, not the solution. Once you have the problem space entities and relationships modeled in static structure, then you can worry about how their behaviors play together to solve the problem in hand.

PMar Kers

unread,
Mar 16, 2012, 3:15:39 AM3/16/12
to umlf...@googlegroups.com
Yes I agree, I also notest a delay posting my messages.

Thanks for the answers! (I have now something to entertain myself during the weekend) :)

Best regards to all

Mar

On Wed, Mar 14, 2012 at 8:02 PM, H. S. Lahman <h.la...@verizon.net> wrote:
Responding to Kers...


the_Geom is the geometric attribute of the table, which will be used for spatial analysis and to answer the geographic/spatial questions.
The relationships to the university and motorway entities are spatial therefore I will use GIS queries for answering the  geographic/spatial questions .
the dfe code it is just numeric - a number per entity (no repetition)
the department (is on the top of the second excel sheet - "courses" ) the dfe code relates the sheet students with the sheet schools ... the district is extracted by spatial analysis (but yes I should include it in the diagram)
under the course codes are the number of students from a specific school, and which course  they are. that's why the table should be something like I put in the diagram.

I still have a real problem with understanding what it is you want to model. This seems to be some hodge-podge of realized (e.g. GIS software), database, and some software you are trying to design. The boundaries between realized code, Data Modeling, and OOA/D application modeling are not clear.

For example, will the software you are designing generate GIS queries to some GIS DBMS system? Or will they be manually generated outside your software? Or will they be "canned" queries provided in external parametric data that will be submitted by your software?

However, if your only question is about the association object, then...



 
The last four questions on the text slide cannot be answered from the data in the Excel spreadsheet. There are no distances, no mention of Birmingham, no mention of M62, and no indication of previous student registrations in the Excel data. I suppose that the previous should be the actual registrations in the excel data.

Your Students Origin By Course entity seems to be identified as as association class. However, association classes qualify relationships, not entities and there is no indication of what relationship it qualifies. Were trying to reify a *:* association into two 1:* associations? Yes I am trying but not really sure if I am doing correctly. but like Simon Wright wrote: "(I think 0..* is right; what happens if there’s a new Course? a new School?)" The truth is that I had almost for sure the diagram was correct except for this class and its relationships - and it is here that I need help.

Unfortunately, the reification through [StudentsOriginByCourse] doesn't really solve the problem because you are still eleft with a *:* relationship to [CourseContacts]. Typically reification is used to reduce a single *:* association to two 1:* or 1:1 associations. Thus (ignoring conditionality)...

<pre>
                [StudentsOriginByCourse]
                           |
         *                 |                 *

[School] ------------------------------------- [CourseContacts]

might go to any of the following reifications:

         1         1                           1             *

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


         1         1                           *             1

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


         1         *                           1             1

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


         1         *                           1             *

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


         1         *                           *             1

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


         *         1                           1             1

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


         *         1                           *             1

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]


         *         1                           1             *

[School] ----------- [StundentsOriginByCourse] --------------- [CourseContacts]

</pre>

In practice most of these will make no sense in the problem space for most *:* situations. The 1st, 4th, and 5th tend to be the most common. In your case I would guess the 1st would be appropriate as each school would likely have its own collection of courses (i.e., its own syllabus of offered courses).

However, that would not work if the same courses are offered by different schools. Then the 5th reification can work where each school has lots of courses and each course is offered by multiple schools. The problem with that is the semantics of [StudentsOriginsByCourse]. Essentially this says that the students taking the courses are various schools define the relationship. The problem with that is that students can take more than one course and you are back to a *:* association on the right side.

Now there is very clearly a relationship in the problem space between schools and courses and probably either the 1st or 5th reification pattern can resolve it. But for that to be true, the association entity needs a semantics that is not about student participation. Instead, its semantics needs to be something like [SchoolSyllabus]. Then if you want to model where students fit in, you would need another [Student] entity with its own set of peer relationships to [School] and [CourseContact].

While we are on problem space semantics, a contact for a course is probably a different entity in the problem space than the course itself. Courses are related to schools to schools via syllabus. Students are related to courses via registration. Contacts are related to courses via faculty assignments. IOW, you need to model the problem space, not the solution. Once you have the problem space entities and relationships modeled in static structure, then you can worry about how their behaviors play together to solve the problem in hand.


-- 
Life is the only flaw in an otherwise perfect nonexistence
   -- Schopenhauer

Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared.

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html

--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to

H. S. Lahman

unread,
Mar 16, 2012, 11:21:29 AM3/16/12
to umlf...@googlegroups.com
Responding to Wright...

> To H.S.: My membership of this group is set to �no email�, and I get

> notification of postings via RSS
> <feed://groups.google.com/group/umlforum/feed/rss_v2_0_msgs.xml>; both
> of your responses to MARKERPED showed up there and are visible in the
> new Google Groups view.

OK, thanks. At least they seem to be getting posted to the forum. I only
use the email connection and apparently Google has stopped echoing to
the sender. I guess I'll just have to BCC myself.

PMar Kers

unread,
Mar 18, 2012, 12:17:04 PM3/18/12
to umlf...@googlegroups.com
Dear all,

I will need to create restrictions or domains for my DB.
and based in your help and suggestions so far, I manage to build this model (very similar to the previous). the relationship between the schools and courses I left as it was, following the suggestion from Simon. I also added the new table for students_ori this will help to connect the courses from the department of the university with the schools (from where the students come - origin). I believe this is the right path.

best regards,
Pedro


On Fri, Mar 16, 2012 at 4:21 PM, H. S. Lahman <h.la...@verizon.net> wrote:
Responding to Wright...


To H.S.: My membership of this group is set to ‘no email’, and I get notification of postings via RSS <feed://groups.google.com/group/umlforum/feed/rss_v2_0_msgs.xml>; both of your responses to MARKERPED showed up there and are visible in the new Google Groups view.

OK, thanks. At least they seem to be getting posted to the forum. I only use the email connection and apparently Google has stopped echoing to the sender. I guess I'll just have to BCC myself.


--
Life is the only flaw in an otherwise perfect nonexistence
  -- Schopenhauer

Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared.

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html

--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to
newmodel.jpg
schhools.csv

PMar Kers

unread,
Mar 18, 2012, 12:49:11 PM3/18/12
to umlf...@googlegroups.com
I for got to add the question... :)
delete restrict - maybe (for schools) , so does not affect the students_ori table
update cascade for the courses table
delete cascade for both table school and courses for the contacts.
 am I missing any constraint?
by the way is there any possibility of having an Inheritance?

regards
Mar

Simon Wright

unread,
Mar 24, 2012, 4:39:35 PM3/24/12
to umlf...@googlegroups.com
I’d have expected Students_Ori to have two ID attributes, namely School (as you have it) and also Course_Code.

You haven’t marked Course_Code as the ID in Course.

--S

MARKERPED

unread,
Mar 28, 2012, 3:47:09 PM3/28/12
to umlf...@googlegroups.com
Hi,
I didn't. because I assume that both Course_code and Id_school are foreign key.

Mar

Simon Wright

unread,
Mar 28, 2012, 6:06:12 PM3/28/12
to umlf...@googlegroups.com
Coming from a Shlaer-Mellor background, I was assuming that when you name an attribute ID_School (for example) you mean that it is an identifying attribute, that is, it forms (part of) the class’s identifier/primary key, and there can only be one instance with a given identifier.

I certainly understood your intention that ID_School and Course_Code would be foreign keys. BUT - taken together - they also form the identifier of Student_Ori; that is, there can only be one instance (row) of Student_Ori with a given (ID_School, Course_Code) pair. Of course, there can be many instances with the same ID_School.

--S
Reply all
Reply to author
Forward
0 new messages