in

The ORM Foundation

Get the facts!

Question on BBB exercise 3.3

Last post Wed, Sep 10 2014 2:30 by renoldscott. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • Sun, Oct 13 2013 15:33

    • maubrey
    • Top 25 Contributor
    • Joined on Wed, Jun 19 2013
    • Posts 21

    Question on BBB exercise 3.3

    I'm working through the exercises in the Big Brown Book.

      Exercise 3.3 question 1 asks:
      Assuming suitable entity types and reference modes are understood, which of the following sentences fit our standard pattern for expressing exactly one elementary fact?
    

    The key says the correct answer is: A, F, and J, but I don't understand why J is correct:

      J) Brisbane and Sydney are in the same country
    

    That seems non-elementary since it's a conjunction. No?

  • Sun, Oct 13 2013 17:53 In reply to

    Re: Question on BBB exercise 3.3

    If the fact type is "City(1) is in the same country as City(2)" then you can see that's elementary. Item (j) in the exercise has the same fact type expressed using a reading which contains the word "and". That may be poor form, but it's a valid way of expressing this elementary fact.
  • Sun, Oct 13 2013 21:13 In reply to

    Re: Question on BBB exercise 3.3

    J is not a conjunction of facts (unlike "Brisbane and Sydney are in some Country" which may be rephrased as a conjunction of "Brisbane is in some Country" and "Sydney is in some Country". It simply means "Brisbane is in the same country as Sydney" -- you can't split this into two facts without loss of information. Cheers Terry
  • Wed, Oct 16 2013 2:58 In reply to

    • maubrey
    • Top 25 Contributor
    • Joined on Wed, Jun 19 2013
    • Posts 21

    Re: Question on BBB exercise 3.3

    I think I understand now.

    I was thinking the fact would be stored as "City is in Country" and that the role "are in the same country" would be derived. But I see now that I was jumping the gun and should have restricted myself to the fact as it was expressed.

    Thank you!

  • Fri, Oct 18 2013 18:00 In reply to

    Re: Question on BBB exercise 3.3

    Although it's valid ORM, it won't work in CQL - "and" is reserved as a clause conjunction. That's probably not a problem for you, but it does come up in other cases too, like "Person is in command and control of Platoon", etc.
  • Sat, Oct 19 2013 9:20 In reply to

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

    Re: Question on BBB exercise 3.3

     Thanks Clifford,

    This makes me wonder about the best way to encode the Pig and Whistle problem in ORM & CQL.

    ================

    The new owner of the pub called The Pig and Whistle was dissatisfied with the way the characters the pub's sign were arranged.
    So he hired a painter to make a new sign and gave the following instructions:

    Please paint the new sign so that there is more space between Pig and and and and and Whistle.

     

    Ken

     

  • Sat, Oct 19 2013 19:04 In reply to

    Re: Question on BBB exercise 3.3

    Very droll, but quite straightforward Ken, since text strings are quoted. See whether this tickles your fancy...

    vocabulary SignWriting;
    
    each Word is written as a String;
    each Spacing is written as an Integer in mm;
    each Position is written as an Integer;
    each Sign is identified by its ID;
    
    each Sign Word is where
        some Sign has text at some Position;
    Sign Word displays one Word;
    Sign Word follows preceding- Sign Word after one Spacing;
    
    Sign Word (in which Sign 1 has text at Position 1) displays Word 'Pig';
    Sign Word (in which Sign 1 has text at Position 2) displays Word 'and'
        and follows preceding- Sign Word (in which Sign 1 has text at Position 1) after Spacing 10;
    Sign Word (in which Sign 1 has text at Position 3) displays Word 'Whistle'
        and follows preceding- Sign Word (in which Sign 2 has text at Position 2) after Spacing 10;
    
    /* New deontic constraint specifies minimum text spacing */
    Sign Word follows preceding- Sign Word after Spacing > 10 mm (otherwise repaint sign);
    
  • Wed, Sep 10 2014 2:30 In reply to

    • renoldscott
    • Top 150 Contributor
      Male
    • Joined on Thu, May 8 2014
    • USA, New YOrk City
    • Posts 3

    Re: Question on BBB exercise 3.3

     Good to know about the new things.

Page 1 of 1 (8 items)
© 2008-2024 ------- Terms of Service