in

The ORM Foundation

Get the facts!

Question about join constraints and paths

Last post Tue, Oct 16 2018 11:19 by Ken Evans. 16 replies.
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts: Previous Next
  • Thu, Oct 11 2018 15:38

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Question about join constraints and paths

     Hello,

    first posting here. With the purpose of learning ORM, I have worked on a simple academic model (see attachment). The model should be mostly self-explaining (anyway, I add an informal description of the numbered constraints below, just to make sure that I haven't made any mistake), but I have a question about one constraint in particular: number 7. The intended meaning is: “If a Chapter (of a Book) is discussed during an Exam of an exam Session of a given Course, then that Chapter must have been taught in that Course”. My question arises because there is more than one path from Chapter to Session. Besides, Exam is ternary, and reified: I am not sure whether there should be an arc from the constraint to Exam as well.

    What does prevent me to read the constraint as follows:  “If a Chapter (of a Book) is discussed in an Exam of a Student that has booked for an exam Session of a Course, then that Chapter must have been taught in that Course”, which obviously doesn't make sense.

    Thanks in advance for any feedback you'd like to provide! 

    Nicola

    PS: Here is, very informally, the intended meaning of each constraint. Please, let me know if I got any of them wrong:

    1. There cannot be two sessions at the same time in the same room.
    2. If a student participates to an exam session in a given room, then that room must have been allocated for that session.
    3. A student can take an exam for a course only once (although each course can offer many exam sessions).
    4. A student cannot book for concurrent sessions.
    5. If a student participates to a given exam session, then that student must have booked for that session.
    6. A student can book for an exam session of a course only if the student was enrolled in that course.
    7. See above.
    8. If a course teaches the (content of a) chapter of a book, then the course must have adopted that book.
    9. A chapter is identified by its title and by the book it appears in.

  • Thu, Oct 11 2018 15:41 In reply to

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Re: Question about join constraints and paths

     


  • Thu, Oct 11 2018 18:31 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 760

    Re: Question about join constraints and paths

     Hi Nicola,

    Glad to hear that you are learning ORM and thanks for your question and for the model.

    It would help me to know how you drew your model. Which software did you use?

    The usual way to check the validity of an object-role model is to ask a person who understands the domain to check the statements that form the "verbalizations" of the drawing. "Verbalizations" are provided automatically by the free NORMA tool that you can download from the Library.

    Right now, I'm extremely busy but may be able to look at your model tomorrow.

    Ken 

     

  • Thu, Oct 11 2018 18:54 In reply to

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Re: Question about join constraints and paths

    That's just a diagramming tool (OmniGraffle for macOS). 

    Please note that my question is not about eliciting or validating requirements; it is about the ambiguity of the diagrammatic representation of one of such requirements (namely, the 7th). 

    Btw, this is not an urgent matter, I don't want to hurry anyone Smile

  • Thu, Oct 11 2018 19:01 In reply to

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Re: Question about join constraints and paths

     Using NORMA is a good suggestion. I'll do it as soon I put my hands on a Windows machine Smile

  • Thu, Oct 11 2018 21:38 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 760

    Re: Question about join constraints and paths

    Hi Nicola,

    Did you know that you can run Windows on a Mac using Parallels?

    You can also run Visual Studio on a Mac

    Ken 

  • Fri, Oct 12 2018 7:37 In reply to

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Re: Question about join constraints and paths

    Would NORMA for Visual Studio 2017 work with Visual Studio for Mac? That would be great news, and I would be interested in trying it out.

  • Fri, Oct 12 2018 8:09 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 760

    Re: Question about join constraints and paths

    I cannot test Visual Studio for Mac because I don't have a Mac.
    However, NORMA runs under Visual Studio so it "should" work with Visual Studio for Mac.

    The release notes for VS for Mac seem to imply that they are still working out the bugs.

    Parallels may be a bit more work but you would be using the same VS as everyone else so I suggest that you use the Parallels free trial to test it out.

    Ken 

     

  • Fri, Oct 12 2018 12:14 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 760

    Re: Question about join constraints and paths

     Hi Nicola,
    Here is part one of my response:
    I have found that unnecessarily complex models can lead to errors, so I always use elementary facts until the domainrequirements force me to use something more complex. I used this principle to designthe simpler version of your model that is shown below.  
    With NORMA you also get an "instant" 5NF relational schema. I find that this helps me to think about the design of the object-role model.

     


  • Fri, Oct 12 2018 12:16 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 760

    Re: Question about join constraints and paths

     Here is Part 2.

    NORMA helps you to detect errors which is why it is much betterto use NORMA to design object-role models than a simple drawing tool.

     

    For example, when I added a subset constraint that is similarto your item 7, the NORMA error message pointed out that this subset constraintis already implied by other constraints in the model. You can’t do this with drawing-only tools like Visio or OmniGraffle.

    Join constraints and join paths are extensively discussed inTerry Halpin’s 2008 book. (AKA "The Big Brown Book" or BBB)

     

    Hope this  helps

     

    Ken



  • Fri, Oct 12 2018 14:14 In reply to

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Re: Question about join constraints and paths

    Thanks for your time and for the useful tips! I will install NORMA then, as it seems to really help with the kind of problems I have encountered.

    Thanks again! 

  • Fri, Oct 12 2018 14:23 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 760

    Re: Question about join constraints and paths

     It would help a lot of people if you could follow up with a short post about your experiences of installing VS and NORMA on a Mac. 

    Good luck

    Ken 

  • Tue, Oct 16 2018 9:53 In reply to

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Re: Question about join constraints and paths

     I managed to install VS 2017 for macOS and I also got a Windows machine with VS 2017. Unfortunately, the latest available download of NORMA does not seem to work with either. I requested access to the test version several days ago, but got no feedback.

  • Tue, Oct 16 2018 10:43 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 760

    Re: Question about join constraints and paths

     "the latest available download of NORMA does not seem to work with either."

    What do you mean by "the latest available download" ? 

     I replied to the email you sent on 12 October at 0841 with a link for the NORMA 2017 download.

    I will resend the link.

    Ken 

     

  • Tue, Oct 16 2018 11:00 In reply to

    • nicola
    • Top 75 Contributor
    • Joined on Thu, Oct 11 2018
    • Posts 8

    Re: Question about join constraints and paths

     For some reason, I didn't get your first reply. Now, I have received the link. Thanks!

Page 1 of 2 (17 items) 1 2 Next >
© 2008-2018 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service