Welcome to Your Future Strategy
What is your number? Do you know the number you need to maintain your lifestyle?
If you don’t know or you haven’t thought about it, that’s okay. We can help get you there. It is our passion to help you develop YOUR Future Strategy.
We are experts in property investment solutions and we take pride in creating wealth for our clients through our comprehensive suite of services.
Visit our website for more info: http://www.yourfuturestrategy.com.au
Reply 1pisode 7, of Saving Sara, Kenny was revealed to be a diffdaniatrappit
Reply 1
pisode 7, of Saving Sara, Kenny was revealed to be a different character than what we are normally accustomed to seeing. In this episode, Kenny was committing an unlawful act and was stealing supplies from the hospital. However, it came to light that the supplies were for a disadvantage homeless diabetic client. Kenny’s reasoning behind stealing supplies was that his patient was using the same syringes which was leading to infections. In this case Kenny is displaying post morality as he was breaking the rules for what he believed was the greater good. Although Kenny is confident that his actions were justified, Sara realizes there is no good reason for hospital theft and that there are better ways to provide this patient greater care. If Kenny would have gotten caught by management, the outcome would be totally different, and he wouldn’t have known about hospitals program to help patients that need resources. The benefits that came from Sara reporting Kenny to Cathleen was that Sara was familiar with the resources available to at risk patients. The importance in Sara communicating with Kenny, is to inform him of his unlawful acts of stealing from the company, and coach him on providing alternative resources to those in the community that may be in need. As an effective leader, Sara meeting with Kenny and explaining what he did was wrong and proper channels he should go through next time this occurs, is showing that oppose to reprimanded him, she is also taking this time to have a teachable moment (Saving Sara, 2022).
Reference
Week 7 Saving Sara, Episode 7: Confronting the Elephant In The Room. Welcome to West Coast University Portal. Retrieved October 4, 2022, from
Reply 2
According to Kohlberg's theory of moral development, each level includes two stages. The three levels are pre-conventional, conventional, and post-conventional. According to the theory of moral development, Kenny's actions align with the signs of stage five of moral development. This is because Kenny decides to steal supplies from the hospital, but not for himself but to give them to the man who is experiencing homelessness. According to this stage, the individual has an awareness that rules might work against certain people while altogether benefiting others. It also states that protecting someones life is more valuable and important than sometimes following the rules. When Sara reported the incidence it resulted in benefiting both Sara and Kenny, and this is because they both were able to find out that the hospital has special programs in place for these kind of situations. When Sara opted not to report Kenny, she was accused of not knowing what was happening in the unit that she is supposed to be leading and managing. What Kenny did was inappropriate even though his intentions were kind. Kenny realized that there is always a way to help others without getting in trouble at work, and putting others at risk as well (Yoder-wise, 2014).
...
This is a brief overview of eMedRec. The presentation includes:
The login screen
Searching for a patient chart
The screen menu and tabs
The Facesheet
Printing Forms
The following slideshow is a brief overview of eMedRec including
Logging into the system
Searching for a Patient chart
Menu system and Tabs
Facesheet
Printing Forms
simio_HW/.DS_Store
simio_HW/HW4.JPG
simio_HW/Model7.1.pdf
7.1. DATA TABLES 217
Table 7.1: Simio Standard Properties for representing table data columns.
Property Type
Boolean
Color
Date Time
Day Pattern
Enumeration
Event
Expression
Integer
List
Rate Table
Real
Schedule
Selection Rule
Sequence Table
State
String
Table
Description
True (1 or non-zero) or False (0)
A property for graphically setting color
A specific day and time (7:30:00 November 18, 2010)
A reference to a Day Pattern for a schedule
A set of values described in a prc~defined enumeration
Event that triggers a token release from a step
An expression evaluated to a real number (1.5+MyState)
An integer number (5, or -1)
A set of values described in a string list
A reference to a rate table
A decimal number (2.7, or -1.5)
A reference to a sched ule
A reference to a selection rule
A reference to a sequence table
A reference to a state
Textual information (Red, l3Iue)
A reference to a data table or sequence table
valuable in organizing, representing, and using your data as well as interfacing
with external data.
7.1.1 Basics of Tables
A data table is defined using the Tables panel in the Data window. To add
a new table you click on Add Data Table in the Tables section of the Table
ribbon. Once you've added a table you can rename it and give it a description
by clicking on the tab for the table and then setting the table properties in the
Property window.
Tip: If you add multiple tables, each one has its own tab. Recall our
discussion in Section 4.1 about configuring window placement. That can be
particularly handy when working with data tables.
To add columns to a table you select a table to make it active and then click
on property types under Standard Property, Element Reference, Object
Reference, or Foreign Key. A table column is typically represented by the
Standard Properties illustrated in Table 7.1. Use an Object Reference when
you want a table to reference an object instance or list of objects such as an
Enti ty, Node, Transporter, or other model object. Likewise use an Element
Reference if you want a table to reference a specific element like aTallyStatistic
or Material.
7.1.2 Model 7-1: An ED Using a Data Table
Let's illustrate these table concepts by representing the data for a simple health-
care example. Consider an emergency departrrwnt (ED) that has some known
data concerning how patients of various severities are handled. Specifically, we
218 CHAPTER. 7. WOR.KING WITH MODEL DATA
Table 7.2: Model 7-1 ED Basic patient data.
Patient Type
Routine
Moderate
Severe
Urgent
Priority
1
2
:~
4
Treatment Time (Minutes)
Random. Triangular(:3,5, 10)
Random.Triangular( 4,8,25)
nandom. Triangular( 10,15,30)
Random. Triangular( 15,25,40)
have four patient types, their priority value, and their typical treatment time
as given in Table 7.2. The first steps in building our model involve defining the
model entities aud the data table:
1. Load Simio and start a new mod.
Welcome to Your Future Strategy
What is your number? Do you know the number you need to maintain your lifestyle?
If you don’t know or you haven’t thought about it, that’s okay. We can help get you there. It is our passion to help you develop YOUR Future Strategy.
We are experts in property investment solutions and we take pride in creating wealth for our clients through our comprehensive suite of services.
Visit our website for more info: http://www.yourfuturestrategy.com.au
Reply 1pisode 7, of Saving Sara, Kenny was revealed to be a diffdaniatrappit
Reply 1
pisode 7, of Saving Sara, Kenny was revealed to be a different character than what we are normally accustomed to seeing. In this episode, Kenny was committing an unlawful act and was stealing supplies from the hospital. However, it came to light that the supplies were for a disadvantage homeless diabetic client. Kenny’s reasoning behind stealing supplies was that his patient was using the same syringes which was leading to infections. In this case Kenny is displaying post morality as he was breaking the rules for what he believed was the greater good. Although Kenny is confident that his actions were justified, Sara realizes there is no good reason for hospital theft and that there are better ways to provide this patient greater care. If Kenny would have gotten caught by management, the outcome would be totally different, and he wouldn’t have known about hospitals program to help patients that need resources. The benefits that came from Sara reporting Kenny to Cathleen was that Sara was familiar with the resources available to at risk patients. The importance in Sara communicating with Kenny, is to inform him of his unlawful acts of stealing from the company, and coach him on providing alternative resources to those in the community that may be in need. As an effective leader, Sara meeting with Kenny and explaining what he did was wrong and proper channels he should go through next time this occurs, is showing that oppose to reprimanded him, she is also taking this time to have a teachable moment (Saving Sara, 2022).
Reference
Week 7 Saving Sara, Episode 7: Confronting the Elephant In The Room. Welcome to West Coast University Portal. Retrieved October 4, 2022, from
Reply 2
According to Kohlberg's theory of moral development, each level includes two stages. The three levels are pre-conventional, conventional, and post-conventional. According to the theory of moral development, Kenny's actions align with the signs of stage five of moral development. This is because Kenny decides to steal supplies from the hospital, but not for himself but to give them to the man who is experiencing homelessness. According to this stage, the individual has an awareness that rules might work against certain people while altogether benefiting others. It also states that protecting someones life is more valuable and important than sometimes following the rules. When Sara reported the incidence it resulted in benefiting both Sara and Kenny, and this is because they both were able to find out that the hospital has special programs in place for these kind of situations. When Sara opted not to report Kenny, she was accused of not knowing what was happening in the unit that she is supposed to be leading and managing. What Kenny did was inappropriate even though his intentions were kind. Kenny realized that there is always a way to help others without getting in trouble at work, and putting others at risk as well (Yoder-wise, 2014).
...
This is a brief overview of eMedRec. The presentation includes:
The login screen
Searching for a patient chart
The screen menu and tabs
The Facesheet
Printing Forms
The following slideshow is a brief overview of eMedRec including
Logging into the system
Searching for a Patient chart
Menu system and Tabs
Facesheet
Printing Forms
simio_HW/.DS_Store
simio_HW/HW4.JPG
simio_HW/Model7.1.pdf
7.1. DATA TABLES 217
Table 7.1: Simio Standard Properties for representing table data columns.
Property Type
Boolean
Color
Date Time
Day Pattern
Enumeration
Event
Expression
Integer
List
Rate Table
Real
Schedule
Selection Rule
Sequence Table
State
String
Table
Description
True (1 or non-zero) or False (0)
A property for graphically setting color
A specific day and time (7:30:00 November 18, 2010)
A reference to a Day Pattern for a schedule
A set of values described in a prc~defined enumeration
Event that triggers a token release from a step
An expression evaluated to a real number (1.5+MyState)
An integer number (5, or -1)
A set of values described in a string list
A reference to a rate table
A decimal number (2.7, or -1.5)
A reference to a sched ule
A reference to a selection rule
A reference to a sequence table
A reference to a state
Textual information (Red, l3Iue)
A reference to a data table or sequence table
valuable in organizing, representing, and using your data as well as interfacing
with external data.
7.1.1 Basics of Tables
A data table is defined using the Tables panel in the Data window. To add
a new table you click on Add Data Table in the Tables section of the Table
ribbon. Once you've added a table you can rename it and give it a description
by clicking on the tab for the table and then setting the table properties in the
Property window.
Tip: If you add multiple tables, each one has its own tab. Recall our
discussion in Section 4.1 about configuring window placement. That can be
particularly handy when working with data tables.
To add columns to a table you select a table to make it active and then click
on property types under Standard Property, Element Reference, Object
Reference, or Foreign Key. A table column is typically represented by the
Standard Properties illustrated in Table 7.1. Use an Object Reference when
you want a table to reference an object instance or list of objects such as an
Enti ty, Node, Transporter, or other model object. Likewise use an Element
Reference if you want a table to reference a specific element like aTallyStatistic
or Material.
7.1.2 Model 7-1: An ED Using a Data Table
Let's illustrate these table concepts by representing the data for a simple health-
care example. Consider an emergency departrrwnt (ED) that has some known
data concerning how patients of various severities are handled. Specifically, we
218 CHAPTER. 7. WOR.KING WITH MODEL DATA
Table 7.2: Model 7-1 ED Basic patient data.
Patient Type
Routine
Moderate
Severe
Urgent
Priority
1
2
:~
4
Treatment Time (Minutes)
Random. Triangular(:3,5, 10)
Random.Triangular( 4,8,25)
nandom. Triangular( 10,15,30)
Random. Triangular( 15,25,40)
have four patient types, their priority value, and their typical treatment time
as given in Table 7.2. The first steps in building our model involve defining the
model entities aud the data table:
1. Load Simio and start a new mod.
White wonder, Work developed by Eva TschoppMansi Shah
White Wonder by Eva Tschopp
A tale about our culture around the use of fertilizers and pesticides visiting small farms around Ahmedabad in Matar and Shilaj.
Technoblade The Legacy of a Minecraft Legend.Techno Merch
Technoblade, born Alex on June 1, 1999, was a legendary Minecraft YouTuber known for his sharp wit and exceptional PvP skills. Starting his channel in 2013, he gained nearly 11 million subscribers. His private battle with metastatic sarcoma ended in June 2022, but his enduring legacy continues to inspire millions.
Book Formatting: Quality Control Checks for DesignersConfidence Ago
This presentation was made to help designers who work in publishing houses or format books for printing ensure quality.
Quality control is vital to every industry. This is why every department in a company need create a method they use in ensuring quality. This, perhaps, will not only improve the quality of products and bring errors to the barest minimum, but take it to a near perfect finish.
It is beyond a moot point that a good book will somewhat be judged by its cover, but the content of the book remains king. No matter how beautiful the cover, if the quality of writing or presentation is off, that will be a reason for readers not to come back to the book or recommend it.
So, this presentation points designers to some important things that may be missed by an editor that they could eventually discover and call the attention of the editor.
Fonts play a crucial role in both User Interface (UI) and User Experience (UX) design. They affect readability, accessibility, aesthetics, and overall user perception.
Visual Style and Aesthetics: Basics of Visual Design
Visual Design for Enterprise Applications
Range of Visual Styles.
Mobile Interfaces:
Challenges and Opportunities of Mobile Design
Approach to Mobile Design
Patterns
Storytelling For The Web: Integrate Storytelling in your Design ProcessChiara Aliotta
In this slides I explain how I have used storytelling techniques to elevate websites and brands and create memorable user experiences. You can discover practical tips as I showcase the elements of good storytelling and its applied to some examples of diverse brands/projects..
ARENA - Young adults in the workplace (Knight Moves).pdfKnight Moves
Presentations of Bavo Raeymaekers (Project lead youth unemployment at the City of Antwerp), Suzan Martens (Service designer at Knight Moves) and Adriaan De Keersmaeker (Community manager at Talk to C)
during the 'Arena • Young adults in the workplace' conference hosted by Knight Moves.
Can AI do good? at 'offtheCanvas' India HCI preludeAlan Dix
Invited talk at 'offtheCanvas' IndiaHCI prelude, 29th June 2024.
https://www.alandix.com/academic/talks/offtheCanvas-IndiaHCI2024/
The world is being changed fundamentally by AI and we are constantly faced with newspaper headlines about its harmful effects. However, there is also the potential to both ameliorate theses harms and use the new abilities of AI to transform society for the good. Can you make the difference?
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEFebless Hernane
CapCut is an easy-to-use video editing app perfect for beginners. To start, download and open CapCut on your phone. Tap "New Project" and select the videos or photos you want to edit. You can trim clips by dragging the edges, add text by tapping "Text," and include music by selecting "Audio." Enhance your video with filters and effects from the "Effects" menu. When you're happy with your video, tap the export button to save and share it. CapCut makes video editing simple and fun for everyone!
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page pmgdscunsri
Figma is a cloud-based design tool widely used by designers for prototyping, UI/UX design, and real-time collaboration. With features such as precision pen tools, grid system, and reusable components, Figma makes it easy for teams to work together on design projects. Its flexibility and accessibility make Figma a top choice in the digital age.
1. NORMA Lab. 1
• Installing NORMA
• Entering a simple ORM schema
• Generating a Relational View
• Generating DDL code
• Generating other code
Note: Some of these slides have additional comments.
File: NORMA_Lab1.ppt. Author: T. Halpin. Last updated: 2011 March 26
1
2. Installing NORMA
Natural ORM Architect (NORMA)
supports ORM 2 (Object-Role Modeling, version 2).
Currently, NORMA requires prior installation of Microsoft
Visual Studio 2005, 2008 or 2010 (standard edition or higher).
Public builds of NORMA are freely available as a plug-in to Visual Studio.
• Download the latest public build of the relevant (VS2005/VS2008/VS2010)
version of NORMA by downloading the relevant zip file at either
http://www.ormfoundation.org/files/folders/norma_the_software/default.aspx
or http://sourceforge.net/projects/orm.
• Unzip the downloaded file
(e.g. right-click the file, and choose Extract All …).
2
3. • Install NORMA (including PLiX1) as follows.
Open the unzipped folder.
If using Microsoft Vista or Windows 7,
double-click SetupVista.bat
and allow overrides of all the security blocks
(alternatively, right-click Setup.bat, and Run as Administrator).
If using Microsoft XP, double-click Setup.bat.
Follow all the defaults in the installation wizard.
Double-click the Readme.htm file in the extracted folder to view the
Readme file in your Web browser. This includes lots of useful tips.
Note: If you previously had an earlier version of NORMA installed,
this will be automatically uninstalled before the new installation.
All of your previous ORM models will be retained.
1
PLiX (Programming Language in XML) is used internally to
facilitate code generation to multiple target languages.
3
4. Entering a simple ORM schema
(a) (b)
Patient Patient
* PatientNr: 1025 * PatientNr: 1056
* Name: Ann Jones * Name: John B. Smith
Smokes Smokes
Allergies: Penicillin Allergies:
Codeine
OK OK
Reference schemes: Patient(.nr); PatientName(); Drug(.name)
Fact types: Patient has PatientName.
Patient smokes.
Patient is allergic to Drug [allergy].
Constraints:
Each Patient has exactly one PatientName.
It is possible that the same Patient is allergic to more than one Drug
and that more than one Patient is allergic to the same Drug.
4
5. This is the basic ORM schema.
[isSmoker]
Patient
PatientName
(.nr)
smokes has
[allergy]
Drug
(.name)
is allergic to
We will now enter it into NORMA
and then generate a database schema from it.
We will begin by creating the ORM file,
and later adding it a project (needed to generate DDL code).
Alternatively, you may create a project to begin with.
5
6. Launch Visual Studio.
File > New > File
Select General category,
Object-Role Modeling File template,
then click Open.
6
7. This is the Document Window
for displaying the ORM diagram.
To see all
available windows,
right-click the
empty space in the
document window.
This context menu
appears. If the
Model Browser and
Properties Window
don’t appear, select them here to display them.
7
8. To open the Fact Editor window,
move the cursor to this option
then left-click the mouse.
The fact editor window should now be displayed.
8
9. Enter the fact type
Patient(.nr) has PatientName()
into the Fact Editor as follows:
•Type “Patient(”
•Click .nr from the drop-down list
•Type the closing parenthesis “)”
•Type “ has PatientName()”
•Press Ctrl-Enter
The fact type should now be Patient PatientName
displayed in the document window. (.nr)
has
9
10. Display the Layout Toolbar
by selecting the menu option
View > Toolbars > Layout
10
11. Drag the mouse to select
the predicate and object types,
then
align these shapes horizontally
by choosing Align Middles
from the Layout toolbar1.
The alignment is based on Patient
(.nr)
PatientName
the last shape selected. has
Nudge Patient closer to the predicate
by selecting Patient and
pressing the right-arrow key. Patient
PatientName
Similarly, nudge PatientName closer (.nr)
has
using the left-arrow key.
1
As an alternative to using the Layout toolbar,
you may select the menu options Format > Align > Middles
11
12. The predicate and object type are displayed with Patient
PatientName
(.nr)
a red line fill or outline, indicating an error state. has
Here, the error on the predicate is that it has no uniqueness constraint.
To view errors on an element, right-click the element’s Context-menu
and select Validation Errors,
e.g. for the object type we get
Alternatively,
to see all errors
look in the
Error List window.
We will add the required constraint and data type later,
and at that point the red error fill will disappear.
12
13. The document window has two scroll bars.
Use the bottom scroll bar to scroll horizontally.
Use the side scroll bar to scroll vertically.
To reposition any part of the diagram, select it,
then either drag it
or use the arrow keys to nudge it.
To select all of the diagram, press Ctrl+A.
To zoom in (magnify), press Ctrl+WheelUp -- wheel mouse
or press Ctrl+Shift+LeftClick.
To zoom out, press press Ctrl+WheelDown --wheel mouse
or press Ctrl+Shift+RightClick.
13
14. You could enter all 3 fact types in the Fact Editor.
Pressing Ctrl-Enter at the end of a line displays the fact type on that line.
This is typically the fastest way to enter fact types.
But instead, let’s enter the other fact types graphically.
To add a unary predicate shape to the left of the Patient shape
either
Click the Unary Fact Type shape in the Toolbox
then click where you want the shape to display
or
Drag a Unary Fact Type shape from the toolbox to where you want it
Patient
PatientName
(.nr)
has
14
15. Select the unary fact type
(click just above its right top corner).
The Move Cursor appears to show the predicate is selected
(not the role).
Now right-click to see the validation error for the predicate.
Now select the role
(click inside it).
Now right-click to see the validation error for the role.
15
16. To connect the role to the Patient shape
select the role,
then drag the mouse pointer
(which now displays as a role connector pointer)
onto the Patient shape
then release the mouse.
Alternatively,
click the Role Connector shape in the Toolbox
then click the role and the Patient shape.
For practice, use Undo (select from the menu, or type Ctrl+Z)
to remove the connection,
then use the alternative method to restore the connection.
16
17. To add a predicate reading,
select the unary predicate shape
and double-click it to open
the ORM Reading Editor.
Type “smokes” after Patient
and press the Enter key.
The predicate reading should
Patient
PatientName
(.nr)
now appear next to the role. smokes has
To reposition a predicate reading in the document window
select it then drag it to where you want.
Use Align Middles to align the shapes horizontally.
To change a predicate reading, select the reading on the predicate shape,
then select the reading in the Reading Editor, then edit as needed.
17
18. To add the Drug entity type,
drag the Entity Type shape from the Toolbox to the document window.
It initially displays with a default name, e.g. “EntityType1”.
Change the name to “Drug”, either by editing it in place
or by editing the Name entry in the Properties window.
18
19. Add the reference mode “name”
in the RefMode property
either by typing it and hitting Enter
or
by selecting it from the drop-down list
of pre-defined reference modes.
The reference mode is now displayed
on the diagram.
Drug
(.name)
19
20. Click the Binary Fact Type shape in the Toolbox
then click where you want to position it
(alternatively,
drag the shape from the Toolbox)
To connect the left role, select it
(click the mouse pointer inside it),
then drag the mouse pointer
to the Patient shape.
Similarly,
select the right role
and drag the pointer to connect it.
20
21. To add a reading for the new predicate,
first select it (click its border so that
the mouse pointer displays as )
Double-click the predicate,
to invoke the ORM Reading Editor
then enter forward predicate reading
“is allergic to” between
“Patient” and “Drug”.
The reading now displays
on the diagram. Patient
PatientName
(.nr)
smokes has
Drug
(.name)
is allergic to
21
22. Select the left role
of the patient name fact type,
right-click to open its context menu
and click Add Uniqueness Constraint.
Patient
The constraint is now displayed. (.nr)
PatientName
has
Select the constraint, and click the
ORM Verbalization Browser
to see the positive verbalization.
Click the button to see the negative verbalization.
22
23. Select the left role
of the name fact type,
right-click to open its context menu
and click Is Mandatory.
Patient
The mandatory role constraint (.nr)
PatientName
smokes has
is now displayed Drug
and its verbalization is added. is allergic to
(.name)
Click for the
positive verbalization.
Click for the
negative verbalization.
23
24. Select one role of the drug fact type
then hold the Shift key down and
select the second role, right-click to
open its context menu
and click Add Uniqueness Constraint.
Patient
The constraint is now displayed. (.nr)
PatientName
smokes has
In the Verbalization Browser, view
Drug
the positive and negative (.name)
is allergic to
verbalizations.
24
25. Patient
By default, NORMA places the mandatory role dot (.nr)
PatientName
has
at the role end Patient
PatientName
instead of at the object type. (.nr)
has
This helps to disambiguate the constraint
when role attachments are very close together
e.g. Drug
this diagram is ambiguous Patient is allergic to
(.name)
PatientName
(.nr)
smokes has
but this is unambiguous Drug
(.name)
Patient is allergic to
PatientName
(.nr)
smokes has
25
26. To change this default (as well as many other options)
open the Options Window (main menu: Tools > Options…)
then select ORM Designer
26
27. Double-click the field entry for
Mandatory Dot Placement
to toggle its value
(from RoleBoxEnd to ObjectShapeEnd).
Alternatively, choose the desired
option from the drop-down list.
To activate this choice, press OK
(this remains your default
preference until you change it).
The mandatory role dot is now Patient
PatientName
(.nr)
displayed at the object type end. smokes has
Drug
(.name)
is allergic to
27
28. By default, NORMA sets data types to Unspecified
until you assign a specific data type.
If you wish to set a default data type,
use the Options dialog to
set the Initial (default) Data Type,
e.g. to TextVariableLength
then press OK.
28
29. Setting the default data type
has no impact on the three object types,
since you created them earlier.
To set the data type for PatientName,
select the PatientName shape,
then in its Properties grid
select the DataType property
and choose Text: Variable Length
from the drop-down list.
Then enter 30 in the DataTypeLength property.
This sets the data type to varchar(30).
The red error fill
disappears, since PatientName
the data type is set.
29
30. If you earlier selected the “.nr” RefMode Patient
PatientName
for Patient from the drop-down list,
(.nr)
smokes has
its data type is set to signed integer. Drug
(.name)
is allergic to
Change its data type to
Numeric: Unsigned Integer.
If you earlier selected the “.name” RefMode
for Drug from the drop-down list,
its data type is already set
to variable length text.
If not, change its data type to that now.
Regardless,
you still need to set the data type length
(e.g. to 20).
Currently, NORMA uses almost the same portable data types as Visio. A later version will
provide an improved set of data types that may be used with a wider range of targets.
30
31. Let’s add the role name “allergy”
to the role played here by Drug.
To add a role name, select the role
and then add the role name
in the Name property
in the Properties window.
The role name is displayed
in square brackets
on the diagram. Patient
PatientName
Select then drag the role name smokes
(.nr)
has
to your preferred position [allergy]
near the role box. Drug
(.name)
is allergic to
31
32. If desired, select the smokes role,
and add the role name isSmoker.
This is purely to predetermine [isSmoker]
Patient
the precise attribute name (.nr)
PatientName
smokes has
for code generation. [allergy]
Drug
(.name)
is allergic to
You may toggle Patient
PatientName
(.nr)
display of role names on/off smokes has
using the Options dialog. Drug
(.name)
is allergic to
32
33. [isSmoker]
Patient
The allergy fact type is m:n, smokes
(.nr)
has
PatientName
so will map to a table by itself [allergy]
when we generate a relational schema. Drug
(.name)
is allergic to
The table name will be the name of
the fact type, which by default
is the fact type’s primary reading
“PatientIsAllergicToDrug”.
Select the fact type, and look at its
name in the Properties window.
Edit the Name
to “DrugAllergy”.
This will now be used as the
generated table name.
33
34. Make any fine adjustments [isSmoker]
Patient
PatientName
you like to the figure smokes
(.nr)
has
and then save the file [allergy]
Drug
(.name)
either is allergic to
by pressing the Save icon
on the main menu
or by choosing the relevant Save option
from the File menu.
Choose SaveAs to save another copy of the model
(entering your desired filename and folder destination).
Choose Save All to save all the open files.
34
35. For practice, Exit Visual Studio by clicking the Close icon.
Now open Visual Studio again,
and reopen your saved file
by choosing File > Recent Files
and selecting the file
you wish to work with.
35
36. NORMA supports mappings to/from various implementation artifacts
DatalogLB MS SQL Server
.NETTiers
IBM DB2
n-ary Binary
OIAL DCIL DDIL SQL: 2003 Oracle
ORM ORM
PostgreSQL
XSD DTD WSDL DSL PLiX OWL EDM Barker ER UML MySQL
OIAL ORM Intermediate Abstraction Language
DCIL Database Conceptual Intermediate Language
C# VB.NET PHP Java DDIL Data Definition Intermediate Language
PLiX Programming Language in XML
mid-stage development
early development
36
38. To generate a relational view
right-click in the document window
and choose Extension Manager …
In the Extension manager
dialog, select the
“Map to Relational Model”
check box as shown
(this will automatically turn
on the “Map to Abstraction
Model” check box)
and press OK.
38
39. This adds a Relational Schema
node to the model browser.
Expand the tree by toggling the
“+” expand buttons to see the
relational schema, as shown.
Mandatory columns are displayed in bold.
The relational schema is implemented
as a view of the ORM schema, so changes
in the ORM schema are reflected in the
relational schema.
Changing names and mandatory role
settings in the ORM schema are reflected immediately.
Other changes currently cause the tree to contract,
so to see the relational changes you need to re-expand the tree.
Now save your work.
39
40. In addition to the model
browser relational view,
a relational diagram view
is available by checking the
Relational View option in the
Extension Manger.
This adds another page
for the relational view
and
DrugAllergy Patient
produces the diagram
Columns Columns
shown opposite. PK : allergy : varchar(20) PK : patientNr : int
PK, FK1 : patientNr : int isSmoker : boolean
patientName : varchar(30)
40
42. To generate code from an ORM schema,
first create a new project using C# or Visual Basic1.
Launch Visual Studio.
File > New > Project
Select Visual C# or VB,
and a template
(e.g. Windows Forms App,
Console App, or
Class Library).
Add project name.
Uncheck the Create
directory option.
Press OK.
1
The type of project you create determines the type of generated 3GL code
(assuming you are going to generate C# or VB code).
42
43. Right-click the Project name in
the Solution Explorer,
then choose
Add > Existing Item….
In the Add Existing Item dialog,
click to change to the
Projects folder,
set “Files of type:” to
All Files to include .orm files,
then select your ORM file
(ORM_Lab1.orm)
and press Add to add
a copy of your ORM file
to the project
If you later want to make
changes to the ORM file
inside the project,
do it to that copy.
43
44. As seen before, the ORM schema maps to
a 2 table relational schema Patient
Columns
PK : patient_Nr : int
is Smoker : boo lean
[isSmoker] patientName : varchar(30)
Patient
PatientName
(.nr)
smokes has
[allergy] DrugAllergy
Drug Columns
(.name) PK : allergy : varchar(20)
is allergic to PK, FK1 : patient_Nr : int
To generate the DDL code to create the relational schema,
proceed as follows.
44
45. To generate code from the ORM model,
first select the model file in Solution Explorer.
In the Properties window,
check that “ORMCustomTool”
is the value for the CustomTool property.
(This should be there by default)
The ORMGeneratorSettings property
should be visible in the dialog
(if not, click a different item in
Solution Explorer and reselect your ORM file).
Now click the button at the right.
45
46. The ORM Generator
Selection dialog
now appears.
Now select
the target(s)
for code generation.
For this example,
let’s choose
SQL Server.
Press Save Changes.
After clicking Save Changes, the generation takes a little while.
When generation is complete, the dialog closes.
46
47. In Solution Explorer
press the expand button
for the ORM file
to view the files below it
(the button changes to ).
Now select the relevant code file
(e.g. ORM_Lab1.SQLServer.sql)
and double-click it to open it
and view the code generated
(or right-click and choose Open
from its context menu).
47
48. The code currently generated for SQL Server is shown below.
NORMA includes further options for controlling column name generation
(see later Lab).
48
49. To ensure that code is word-wrapped, set this option in Visual Studio.
Choose Tools > Options,
select Text Editor > All Languages – General, check the Word wrap
option, and press OK.
49
51. To see code
generation for
other targets,
repeat the procedure
for ORM Generator
Settings
(press button),
select desired options,
press Save Changes
and open the
relevant files to
see the code
generated.
Note: Check PlixSupport at most once per project.
For the options shown here, choose PLiX_Implementation
to generate C# code.
51
52. To see the C# generated
select the ORM file in Solution Explorer
expand the abstract PLiX xml entry
and double-click the .cs file under it.
A fragment of the code is shown below.
52
53. C# was generated because
we initially set up our project as a C# project.
If we had instead created a Visual Basic project,
then VB code would have been generated
(with code file suffix .vb).
In a VB project, ‘Show All Files’
needs to be selected in the Solution Explorer toolbar.
DO NOT delete generated files from Solution Explorer.
To remove generated files, open the ORM Generator Settings
dialog from the properties window of the ORM file. Deselect the
generator types that you do not want, and then click Save
Changes. The unwanted generated files will then be removed.
53
54. That concludes laboratory session 1. Lab 2 introduces ternary
associations, external constraints, value constraints, and derived
fact types.
[isSmoker]
Patient
PatientName
(.nr)
smokes has
[allergy]
Drug
(.name)
is allergic to
54
Editor's Notes
Consider the sample forms about medical patients. Conceptually, each form involves 3 elementary fact types, as shown. Each patient has exactly one (at least one and at most one) patient name. A check box is used to indicate whether a patient smokes. A person may have zero or more drug allergies, and vice versa – this many-to-many nature of the relationship may be verbalized as shown. The ORM conceptual schema is specified in textual form.
Alignment is activated if multiple top-level items are selected AND one of the top level items is the primary selection (indicated by a dotted line inside and outside the shape border). If a non-top level shape is the primary selection then alignment is not activated. You can shift-click on a selected element to make it primary, or Control-Click twice to turn selection off and back on for the element. Note that selecting the fact type (as opposed to one of its roles or internal uniqueness constraints) is tricky. Make sure the move cursor (4 arrow tips) is showing when you click the fact type to select it.
You can also double-click any shape (see notes in previous slide on where to click a fact) to activate the first error that supports activation. Error activation puts the editor in the state required to fix the error. In this case a double-click on the fact type (or selecting the error) will add an internal uniqueness constraint with no selected roles and activate it for editing. A second double click on the first role will add that role to the constraint and commit the change. To be less invasive, the error fill color is actually pink rather than red, but think of it as red to associate it with the color commonly used for warning signs.
You can see two parts of one diagram at the same time with the Window > New Window command. You can also add additional diagrams to the document.
You can also select the role and use the Properties Window to set the RolePlayer property.
Activating the error will make the correct selection in the ORM Reading Editor and activate the control for editing.
F2 can be used to activate any in-place editing.
Double-click the Drug entity type to automatically open the RefMode dropdown.
The ORM Reading Editor is available with any selection that is associated with a fact type (role, reading, constraint, rolename, fact type, etc).
The IsMandatory property is also available in the Properties Window. In addition, for binary facts, the Multiplicity property on a role can be used to add uniqueness and mandatory constraints.
The toolbox gesture for this is: Select Internal Uniqueness Constraint Click the fact to add it to. The constraint will be added activated with no constraints. Click the first role Double click the second role to add it and commit the constraint To extend a single role constraint: Double-click the constraint to activate it for editing Double-click the role to add To make a double-role constraint a single Double-click the constraint to activate it for editing Control-Double-Click the role to remove
Note that these are machine-specific settings. All diagrams display according to the users settings.
Each fact type shape also has a DisplayRoleNames property that can be used to control role name display on individual fact types.
As noted in the SourceForge install instructions, you’ll need the http://www.sourceforge.net/projects/PLiX files installed to see the CSharp and VisualBasic code generation.