NORMA Lab. 3 Revision: Unary and Binary fact types Adding Pages

Slides:



Advertisements
Similar presentations
Customizing the MOSS 2007 Search Results November 2007 Rafael Perez.
Advertisements

© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
InDesign CS3 Lessons 1 and 2. Work Area When First Opened.
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.
Getting Started with Expression Web 3
1 NORMA Lab. 8 Further Aspects of Relational Mapping Revision (relational view, data type refinement) Controlling Table Names Controlling Column names.
IE 411/511: Visual Programming for Industrial Applications
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
1 NORMA Lab. 2 Revision: Unary and Binary Fact Types Ternary Fact Types Inclusive-Or Constraints External Uniqueness Constraints Value Constraints Derived.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
1 NORMA Lab. 6 Adding Sample Populations Controlling Error Message Display File: NORMA_Lab6.ppt. Author: T. Halpin. Last updated: 2009 June 12.
Modeling & simulation of business cases Editing diagrams.
Creating Buttons – Lesson 51 Creating Buttons Lesson 5.
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.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
1 Introduction to modeling Object-role modelling (ORM) Slides for this part are based on Chapters 3-7 from Halpin, T. & Morgan, T. 2008, Information Modeling.
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.
XP Tutorial 3 Creating Animations. XP New Perspectives on Macromedia Flash MX Elements of Animation Layers are used to organize the content of.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Word 2010 Headers and Footers You can make your document look professional and polished by utilizing headers and footers. The header is a section of the.
1 Word Processing Intermediate Using Microsoft Office 2000.
1 Pertemuan 10 Using Type Matakuliah: U0344 / DESKTOP 1 Tahun: 2006.
ASENT_RCM.PPT Reliability Centered Maintenance (RCM) Analysis Last revised 01/14/2011.
C# Programming: From Problem Analysis to Program Design1 Visual Studio Configuration C# Programming: From Problem Analysis to Program Design 4th Edition.
Dive Into® Visual Basic 2010 Express
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Chapter 1: An Introduction to Visual Basic .NET
Creating a Presentation
ASP.NET Forms.
Chapter 2: The Visual Studio .NET Development Environment
Home Page - Can be customized by the user Clicking on preferences in the upper right allows you to customize you home page, this one is set to favorites.
Key Applications Module Lesson 17 — Organizing Worksheets
DRAWING LINES To draw lines click View in the Main Menu Toolbar -> Toolbars and check the Editor option. The Editor toolbar will appear amongst the toobars.
Chapter 1: An Introduction to Visual Basic 2015
Chapter 2 – Introduction to the Visual Studio .NET IDE
3.01 Apply Controls Associated With Visual Studio Form
Program and Graphical User Interface Design
How to design a Windows Forms application
Visual programming Chapter 1: Introduction
3.01 Apply Controls Associated With Visual Studio Form
Enhancing Forms with OLE Fields, Hyperlinks, and Subforms
Microsoft Word: Tables
School’s Name Teacher’s Name Date
NORMA Lab. 8 Further Aspects of Relational Mapping
An Introduction to Using
Program and Graphical User Interface Design
Word Tutorial 3 Creating Tables and a Multipage Report
Microsoft Office Access 2003
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
Microsoft Office Access 2003
NORMA Lab. 2 Revision: Unary and Binary Fact Types Ternary Fact Types
Key Applications Module Lesson 12 — Word Essentials
NORMA Lab. 5 Duplicating Object Type and Predicate Shapes
Digital Image Processing
NORMA Lab. 1 Installing Visual Studio Installing NORMA
NORMA Lab. 6 Adding Sample Populations
Using Templates and Library Items
Practice Activity – Part 1
NORMA Multi-Page Relational View
Key Applications Module Lesson 12 — Word Essentials
HIBBs is a program of the Global Health Informatics Partnership Learning the Basics of Microsoft Word 2019 and Microsoft office support TFN
Home Page - Can be customized by the user Clicking on preferences in the upper right allows you to customize you home page, this one is set to favorites.
Presentation transcript:

NORMA Lab. 3 Revision: Unary and Binary fact types Adding Pages Objectification Independent Object Types Set-Comparison Constraints (single-role and multi-role) Setting Data Types In this lab, we will enter the second page of the following 2 page ORM schema (you should have entered the first page in Lab 2). File NORMA_Lab3.ppt. Author: T. Halpin. Last updated 2009 May 25

Page 1: Cinema

Page 2: Movie

In Visual Studio, open the ORM file you worked on in Lab 2. File > Recent Files > ORM_Lab2.orm Save this new version as ORM_Lab3.orm:

To add a new page, right-click the Cinema tab in the document window, select New Page > ORMDiagram, then right-click the NewPage tab and select Rename Page, enter the name “Movie”. A blank page called “Movie” is now ready for you to add to the model.

Open the Fact Editor, either by clicking on its tab below the document window, or by right-clicking a space on the document window and selecting ORM Tool Windows > ORM Fact Editor. In the Fact Editor, type the fact type “Movie has / is of MovieTitle()” and press Ctrl-Enter to add it to the diagram. Similarly, enter “Movie toured Country(.code)” into the Fact Editor, and align and position the shapes as shown. Movie is shaded, since it is a duplicate of a shape displayed elsewhere (in this example, Movie also occurs on the Cinema page).

Right-click Movie’s “has” role and select IsMandatory from its context menu. Now right-click the same role and select Add Uniqueness Constraint. Now shift-click both roles of the toured predicate and right-click to select Add Uniqueness Constraint. The diagram should now appear as shown.

Select the toured predicate, right-click, and select Objectify Fact Type from the context menu. The objectified fact type is now displayed with the name “MovieTouredCountry”. Move the name to the position shown. Edit this name in-place to “MovieTour”. Alternatively, select either “MovieTour” or the objectified fact type, and change its Name property to “MovieTour”.

Select the name or the rounded rectangle of the objectified fact type, and double-click its IsIndependent property to toggle its value to True. The name of the objectified type now displays with a “!”, indicating the type is independent (i.e. some instances in its population might not play any other roles).

Now add the fact types “MovieTour began on Date” “MovieTour ended on Date”, position them as shown, and add uniqueness constraints to their first roles. Right-click the predicate “ended on”, and select Orientation > Constraints On Bottom to move its uniqueness constraint below the predicate. Alternatively, select the predicate and set its ConstraintDisplayPosition property to Bottom.

Now select the Subset Constraint shape from the toolbox, and position it between MovieTour’s roles as shown. Double-click the constraint to activate the constraint pointer, drag the pointer to the “ended on” role, then double-click it to indicate the end of the first role sequence (in this case, a single role, which displays as “1.1”). Now drag the pointer to the “began on” role, then double-click it to indicate the end of the second role sequence (in this case, a single role, which displays as “2.1”). Click outside the shape (or press Esc) to display the final result.

Enter the fact types “Person(.name) directed Movie” “Person reviewed Movie” and move them to the left of Movie (if needed, select the whole figure and move it to the right to make space) and add spanning uniqueness constraints to both as shown. Move “directed” above its predicate shape then reposition the lower UC below its predicate, e.g. right-click, Orientation > Constraints On Bottom. Drag the Exclusion Constraint shape from the toolbox to between the predicates as shown.

Double-click the constraint to activate the constraint pointer, and click each role of the “directed” predicate (they display as “1” and “2”). Double-click to commit the first role-sequence (the roles are now numbered 1.1 and 1.2). Now click each role of the “reviewed” predicate Double-click to commit the second role-sequence (these roles are now numbered 2.1 and 2.2). Click outside or Press Esc to display the result.

Add the fact type “Person has PersonTitle()” Right-click its left role, and add a mandatory constraint and uniqueness constraint as shown. Select “PersonTitle” and add the value constraint shown to its ValueRange property (don’t add quotes or braces, as NORMA does that for you). Reposition the displayed constraint as shown.

In Lab 1, we used Tools > Options > ORM Designer to set the “Initial Data Type” to “TextVariableLength” which is incomplete because it has a default length of 0. Predefined refmodes (e.g. code, name, nr) have other default data types. It is time now to refine the data type settings for the value types. Click the “ORM Model Browser” tab in the Solution Explorer and expand the “Object Types” node. This shows all of the Object Types (Entity Types, Value Types, Objectified Fact Types) in the conceptual model (both pages). Only the value types (shown with a dashed line) have data types, so there is no need to specify data types for the other types .

First, we will set the DataType for State_code. Earlier, we set the reference mode on “State” to “.code”, which automatically created the value type State_code for State. Click “State_code” in the ORM Model Browser1, and view its properties in the Properties window2. The default DataType for “.code” is Text: Fixed Length with a Length of 0. Change the DataTypeLength property to 2 (e.g. ‘UT’, ‘MN’). 1 You can also select a shape on the diagram to modify its data type, but it’s much quicker to set all the data types in the model browser. 2 If the Properties window is not open, press F4 in the Model Browser to invoke it.

Next, click StateName in the Model Browser. In the Properties window, change its DataTypeLength to 30. Keep its default DataType as “Text: Variable Length”. Choose your preferred method for setting these DataTypes to complete the model: Set Cinema_name’s DataTypeLength to 30. Set CityName’s DataTypeLength to 30. Set Country_code’s DataTypeLength to 2. Set Movie_nr to Unsigned Small Integer. Set MovieTitle’s DataTypeLength to 30. Set Person_name’s DataTypeLength to 30. Set PersonTitle’s DataTypeLength to 10. Change ymd’s DataType to Temporal: Date. Changing the DataTypes can also be done on the Relational Model, which will be discussed in a future lab.

That completes the Movie page of the schema. You may return to the Cinema page of the ORM Model by clicking the Cinema tab. Press Save, and then exit.