NORMA Lab. 2 Revision: Unary and Binary Fact Types Ternary Fact Types

Slides:



Advertisements
Similar presentations
Microsoft ® Word 2010 Training Create your first Word document II.
Advertisements

Microsoft Excel. Click on “Start,” then “Microsoft Office Excel.”
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
Page Features Footnotes and endnotes Headers and footers Page numbering Margins Columns.
CREATING A MULTIPLE PAGE REPORT Presented by: Dr. Ennis-Cole.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
Key Applications Module Lesson 12 — Word Essentials
Spreadsheet. Objectives Create a new blank workbook. Create a new blank workbook. Identify user interface elements that you can use to accomplish basic.
EDITING AND FORMATTING A DOCUMENT Presented by: Dr. Ennis-Cole.
NORMA Lab. 1 Installing NORMA Entering a simple ORM schema Generating a Relational View Generating DDL code Generating other code 1 Note: Some of these.
1 NORMA Lab. 4 File: NORMA_Lab4.ppt. Author: T. Halpin. Last updated: 2011 September 6 Revision: Adding Value Constraints, Set-comparison Constraints Adding.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
European Computer Driving Licence Syllabus version 5.0 Module 4 – Spreadsheets Chapter 22 – Functions Pass ECDL5 for Office 2007 Module 4 Spreadsheets.
Chapter 2 Creating a Research Paper with References and Sources Microsoft Word 2013.
CTS130 Spreadsheet Lesson 4 Working with Cells, Columns, Rows, and Sheets.
1 NORMA Lab. 2 Revision: Unary and Binary Fact Types Ternary Fact Types Inclusive-Or Constraints External Uniqueness Constraints Value Constraints Derived.
XP New Perspectives on Microsoft Access 2002 Tutorial 21 Microsoft Access Tutorial 2 – Creating And Maintaining A Database.
1 NORMA Lab. 6 Adding Sample Populations Controlling Error Message Display File: NORMA_Lab6.ppt. Author: T. Halpin. Last updated: 2009 June 12.
1 NORMA Lab. 7 Generating Reports More Display Options File: NORMA_Lab6.ppt. Author: T. Halpin. Last updated: 2009 June 9.
1 NORMA Lab. 5 Duplicating Object Type and Predicate Shapes Finding Displayed Shapes Using the Diagram Spy Using Multiple Windows Using the Context Window.
Basic Editing Lesson 2.
1 NORMA Lab. 3 File NORMA_Lab3.ppt. Author: T. Halpin. Last updated 2009 May 25 Revision: Unary and Binary fact types Adding Pages Objectification Independent.
Opening a File 1.Open Word 2.Click the Microsoft Office button(Very top left hand corner). A menu appears 3.Click Open. The Open dialog box appears 4.Use.
MS WORD INFORMATION TECHNOLOGY MANAGEMENT SERVICE Training & Research Division.
Key Applications Module Lesson 12 — Word Essentials Computer Literacy BASICS.
1 Pertemuan 10 Using Type Matakuliah: U0344 / DESKTOP 1 Tahun: 2006.
Chapter 8 Using Document Collaboration, Integration, and Charting Tools Microsoft Word 2013.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
Shelly Cashman: Microsoft Word 2016
Practical Office 2007 Chapter 2
CUS POWERPOINT PRESENTATION
PhotoShop Creative Suite 3
TIPS & TRICKS.
Fastest way for already created documents
Creating, Formatting, and Editing a Word Document with Pictures
Tutorial 1 – Creating a Document
Indent markers In some cases, you may want to have more control over indents. Word provides indent markers that allow you to indent paragraphs to.
Tables A table is an excellent way to organize information.
An Introduction to Using
Developing Editing and Formatting Skills
Program and Graphical User Interface Design
NORMA Lab. 3 Revision: Unary and Binary fact types Adding Pages
NORMA Lab. 4 Revision: Adding Value Constraints, Set-comparison Constraints Adding Frequency Constraints Adding Ring Constraints Adding Subtyping Adding.
NORMA Lab. 7 Generating Reports More Display Options
Basic Editing Lesson 2.
Working with Headers and Footers
Chapter 2 Creating a Research Paper with References and Sources
Key Applications Module Lesson 12 — Word Essentials
NORMA Lab. 5 Duplicating Object Type and Predicate Shapes
Inserting Pictures and Symbols in Word documents
NORMA Lab. 1 Installing Visual Studio Installing NORMA
Shelly Cashman: Microsoft Word 2016
Microsoft Office Access 2003
Chapter 4.
NORMA Lab. 6 Adding Sample Populations
Microsoft Excel 2007 – Level 1
European Computer Driving Licence
Objectives At the end of this session, students will be able to:
Basic parts of Word 2016 EIT, ©Author Gay Robertson, 2017.
Practice Activity – Part 1
Key Applications Module Lesson 12 — Word Essentials
University of Warith AL-Anbiya’a
HIBBs is a program of the Global Health Informatics Partnership Learning the Basics of Microsoft Word 2019 and Microsoft office support TFN
Fundamentals of Using Excel
Chapter 8 Using Document Collaboration and Integration Tools
Welcome To Microsoft Word 2016
TERMS AND CONDITIONS   These PowerPoint slides are a tool for lecturers, and as such: YOU MAY add content to the slides, delete content from the slides,
Presentation transcript:

NORMA Lab. 2 Revision: Unary and Binary Fact Types Ternary Fact Types Inclusive-Or Constraints External Uniqueness Constraints Value Constraints Derived Fact Types Renaming Pages In this lab, we will enter the first page of the following 2 page ORM schema. File: NORMA_Lab2.ppt. Author: T. Halpin. Last updated: 2009 June 9

Page 1: Cinema

Page 2: Movie

1. In Visual Studio, open a new ORM file. File > New > File Select General > Object-Role Modeling File. Press Open. 2. Press the Save icon name the file ORM_Lab2.orm and press Save.

Type the fact type “City is large” into the Fact Editor. Press Ctrl-Enter to add it to the diagram. Do the same for “City is small”. (“City” should be there already). Move the City object type to the right, and place the predicate text as shown. Select the Inclusive Or Constraint shape. Position then click the mouse to place the constraint shape (alternatively, drag the constraint shape from the Toolbox to the desired position).

If needed, double-click the constraint shape to activate editing mode (the mouse pointer changes, and displays the instructions). Move the constraint pointer to the first role and click it (a “1” appears in the role). the second role and click it (a “2” appears in the role). Double-click to commit the constraint. The pointer returns to normal. If you click the ORM Verbalizer window you will see the constraint verbalized.

the menu option View > Toolbars > Layout. If the Layout Toolbar is not already displayed, display it by selecting the menu option View > Toolbars > Layout. To align the constraint shape vertically with the roles, drag the mouse to select these 3 shapes, then select the Align Centers option from the layout toolbar1. The shapes are now aligned. 1 Alternatively, select Format > Align > Centers from the menu.

The City shape has red hash fill indicating an error state. Right-click the City shape to see the error. The error may also be viewed in full from the ORM Verbalizer window. We need to add a preferred reference scheme.

Enter the following fact types in the Fact Editor. Press Ctrl-Enter after each to add it to the diagram. Drag the shapes roughly to the positions shown. Select the predicates, then use Align Centers to align the predicates vertically. For each binary predicate, select the predicate and its right hand object type, then use Align Middles from the layout toolbar (or Format > Align > Middles from the menu) to align them horizontally. Select City’s role in the location predicate, right-click, then select IsMandatory from its context menu to add the mandatory role constraint.

Select City’s role in the location predicate, right-click, then select Add Uniqueness Constraint from its context menu to add the uniqueness constraint. Now drag the predicate text to position it over the role as shown. Similarly, add a mandatory role constraint and a uniqueness constraint to City’s role in the CityName predicate, and position the predicate text as shown.

Now select the External Uniqueness constraint shape from the tool box and click to position it between the roles played by State and CityName. Double click the External Uniqueness constraint to activate the constraint connector tool. Move the constraint pointer to the first role and click it (a “1” appears in the role). Move the constraint pointer to the second role and click it (a “2” appears in the role). Double-click the last role to commit the constraint. The pointer returns to normal, and the constraint is verbalized.

With the constraint selected, set its IsPreferredIdentifier property to True, either by double-clicking the field where it says False (which toggles the value to True) or by selecting True from the drop-down list (as shown). The constraint now displays as a preferred identifier (double uniqueness bar) and City is no longer in an error state.

In the Fact Editor, type the fact type “State has StateName()” and press Ctrl-Enter to add it to the diagram. Then add the constraints shown. To add an inverse predicate reading for “has”, select the fact type, open the Fact Editor, edit the fact type reading by inserting “/is of” after the “has”1, and then Ctrl-Enter to commit the change. Both forward and inverse readings now display on the diagram. Note: To delete an inverse reading in the Fact Editor, select the inverse reading after the slash “/” (do NOT remove the slash), press the Delete key, and then Ctrl-Enter to commit the change. 1NORMA displays a space on either side of “/” when displaying it in the document window, whether or not you include these spaces in the Fact Editor.

An alternative way to edit fact type readings that works also for more complex cases such as adding multiple readings for n-aries is to use the Reading Editor. For example, as another way to add an inverse predicate reading for “has”, double-click the predicate reading to open the Reading Editor with that fact type displayed. Press “New” then the down-arrow and double-click the second row with the reading order StateName, State. A view of the new fact type reading now appears. Edit this by inserting “is of” between the terms as shown. Press Enter to commit the new reading, and it now displays on the diagram.

Now add the fact type “Cinema(.name) is in City” and add mandatory and uniqueness constraints to the first role, and position the shapes roughly as shown. All predicates in NORMA are displayed horizontally by default. Move the Cinema shape directly below the City shape. Right-click the “is in” predicate, and from its context menu choose Orientation > Vertical Rotated Left. NORMA adds an upwards arrow-tip to the predicate reading to indicate the direction in which to read it. Select the fact type and align the shapes vertically as shown using the layout toolbar option Align Centers (or the menu option Format > Align > Centers).

Now add the fact type “Cinema has NrTheaters()”, and move the new shapes to the left of Cinema, as shown. The predicate is displayed in left-to-right reading order. To reverse the predicate reading order display, select a role, right-click and select Reverse Role Order. The predicate is now displayed in right-to-left reading order. NORMA adds a left-pointing arrow-tip to indicate the direction in which to read the predicate.

Add mandatory and uniqueness constraints to the right-hand role then use Align Middles to align as shown. Then select NrTheaters, and change its DataType property to numeric (e.g. Unsigned Integer). Now select NrTheaters and enter the value constraint 1..20 in its ValueRange property (don’t add braces, as NORMA does that for you). Pressing Enter displays the constraint in braces on the diagram. Position it as shown.

Now add this ternary fact type: Position it as shown. Add a uniqueness constraint spanning the first two roles by holding the Shift key down as you select the two roles then right-click and choose Add Uniqueness Constraint. Align the shapes and reposition the predicate text as shown.

Add the fact type “Cinema is multiplex” in the Fact Editor, Cntrl-Enter to commit, then position it as shown. Now select the unary fact type (not just the role) by clicking just outside the top-right corner of the role. The cursor should display as a 4-headed arrow. In the DerivationRule property, click the drop-down arrow to open the DerivationRule window.

Now type the derivation rule shown. Press Ctrl-Enter after “iff” to move to the next line, then indent a few spaces before typing the rest. Press Enter to commit the rule. The tool now displays an asterisk after the predicate reading on the diagram and enters “Derived” in the DerivationStorage property, indicating the fact type is fully derived and not stored. For later use in a model note, select the derivation rule and press Ctrl-C to copy the rule to the clipboard.

To explicitly show your derivation rule on the model, you must add a Model Note. Click “Model Note” in the toolbox, drag it near the unary predicate, then right-click the Note shape and open the Notes Editor ORM Tools Windows > ORM Notes Editor.

Paste the derivation rule previously copied to the clipboard into the Notes Editor by pressing Ctrl-V. Alternatively, you can enter the rule directly (press Ctrl-Enter to add a new line; press Enter to commit the change). Click anywhere on the document window to display the note. If you wish to connect the model note to the unary predicate, click the “Model Note Connector”, in the toolbox, then click inside the note, then click again inside the role box to connect. A dotted line should now appear connecting the note to its model element.

That completes page 1 of our schema, which should now look something like this:

To name this page “Cinema” right-click the page tab (by default named “ORM NewModel”), select Rename Page and enter “Cinema”. The new page name now displays. Save your file and exit. We will complete page 2 of the schema in the next lab.