advanced manufacturing systems design © 2000 john w. nazemetz lecture 13 topic : information...

78
Advanced Manufacturing Systems Advanced Manufacturing Systems Design Design © 2000 © 2000 John W. Nazemetz John W. Nazemetz Lecture 13 Topic : Lecture 13 Topic : Information Modeling Information Modeling Segment A Topic: Segment A Topic: Definition and Concepts Definition and Concepts

Upload: suzan-ball

Post on 03-Jan-2016

219 views

Category:

Documents


2 download

TRANSCRIPT

Advanced Manufacturing Advanced Manufacturing Systems DesignSystems Design

© 2000 © 2000 John W. NazemetzJohn W. Nazemetz

Lecture 13 Topic :Lecture 13 Topic : Information Information ModelingModeling

Segment A Topic:Segment A Topic: Definition and Definition and Concepts Concepts

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 2

ADVANCED ADVANCED MANUFACTURING MANUFACTURING SYSTEMS DESIGNSYSTEMS DESIGN

Information ModelingInformation Modeling

Definition and ConceptsDefinition and Concepts

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 3

OverviewOverview

• DefinitionsDefinitions– Key Elements in Definitions

• Information Modeling ConceptsInformation Modeling Concepts

• Information Modeling TerminologyInformation Modeling Terminology

• Information Modeling ProcessInformation Modeling Process

• Information Modeling Information Modeling

Languages/MethodsLanguages/Methods

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 4

Information ModelingInformation Modeling

• A process that describes things, A process that describes things, the properties that these things the properties that these things possess (or we care about), how possess (or we care about), how these things behave, and how they these things behave, and how they interact.interact.

After Schenk and Wilson, Information Modeling: The EXPRESS Way, Oxford University Press, Oxford, 1994.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 5

Information ModelInformation Model

• ““An information model is a formal An information model is a formal description of types of ideas, facts, description of types of ideas, facts, and processes which together form a and processes which together form a model of the portion of interest of model of the portion of interest of the real world and which provided an the real world and which provided an explicit set of interpretation rules.”explicit set of interpretation rules.”

Schenk and Wilson, Information Modeling: The EXPRESS Way, Oxford University Press, Oxford, 1994, p. 10.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 6

Information Model – Information Model – Key ConceptsKey Concepts (1) (1)

• ““formal description of types of ideas, formal description of types of ideas, facts, and processes”facts, and processes”– Built from limited set of primitive concepts

• Each concept has precise meaning

– Rules can be used to build more complex constructs from the primitives• Defined Rules combined with defined primitives

produce further items with precise definitions

– Goal: complete, precise, unambiguous representation (computer-interpretable)

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 7

Information Model – Information Model – Key Concepts Key Concepts (2)(2)

• ““which together form a model of the which together form a model of the portion of interest of the real world”portion of interest of the real world”– Models area of interest (i.e., a domain)– Models “Real World” things

• Must be able to model/include all things of interest

• Must be able to include/express all relationships between the things of interest

– Model must be independent of Processing/ Programming

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 8

Information Model – Information Model – Key Concepts Key Concepts (3)(3)

• ““and which provided an explicit set and which provided an explicit set of interpretation rules.”of interpretation rules.”

– All Rules/Relationships Must be Explicit.

– All Rules/Relations Must be Specified.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 9

Information Model – Information Model – Practical ConsiderationPractical Consideration• Must be Computer-InterpretableMust be Computer-Interpretable

– Information Models are Complex, Computer Interpretability Facilitates• Syntax Errors• Incomplete Syntax• Data Inconsistencies• Automatic Tools Can be Built/Used

– Lexical and Graphical Tools

• Automatic Conversion to Application Formats/Forms

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 10

Information Modeling Information Modeling Concepts Concepts (1)(1)

• CategorizationCategorization– Defines Categories or Classes

• Members Have (Some) Common Attributes• Members May Have Additional Attributes• Form of Abstraction/Can Be Used to Control

Level of Description Required to Describe Something

– Generalization/Specialization• “Levels” of Classes• Higher Levels More General• More Rules/Restrictions Applied in

Specialization• Specialized Classes Inherit Characteristics of

The General Class (e.g., Car, Sports Cars)

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 11

Information Modeling Information Modeling Concepts Concepts (2)(2)

• GroupingGrouping– Means of Partitioning a Large Number

of Things into Smaller “Clumps”– The Same Things Can be Grouped Many

Different Ways• Reflect User(s) Viewpoint(s) at Different

Points in Time

– Not a Form of Abstraction (Although they can be based on Categories, which are Abstractions)

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 12

Information Modeling Information Modeling Concepts Concepts (3)(3)

• AggregationAggregation– Can Be Ordered

• Sections in a Book – Sequence Important to Meaning/Interpretation

– Can Be UnOrdered• Bag of Cookies – Sequencing Unimportant to

Meaning/Interpretation

• TerminologyTerminology– Must be Unambiguous, Defined,

Understood

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 13

Information Modeling Information Modeling Concepts Concepts (4)(4)

• RepresentationsRepresentations– Must Be Finite, Rich/Robust– Lexical

• Words, Punctuation (Symbols)• Grammar (Rules)

– Graphical• Icons (Symbols)• Relationships Between Icons/Connectors

(Rules)

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 14

Information Modeling Information Modeling Terminology Terminology (1)(1)

• EntityEntity– An entity is a modeling construct that

represents a real world thing that is of interest to the modeler.

• Property Property – A property is a particular aspect of the

real world thing/entity. Properties may represent values, constraints, behavior, …

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 15

Information Modeling Information Modeling Terminology Terminology (2)(2)

• AttributeAttribute– An attribute is a particular kind of

property and it identifies/defines an interesting trait of the thing and how it is represented (number, string, …).

• ConstraintConstraint– A constraint is a particular kind of

property that restricts the other properties of the entity or, when applied to entities, restricts the relationship of the entities.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 16

Information Modeling Information Modeling Terminology Terminology (3)(3)

• Simple TypeSimple Type– A simple type is a elemental

representation that cannot be further divided. Examples are: numbers, strings, Boolean values, … .

• RelationshipRelationship– A relationship is and association between

two model constructs. Relationships can be implied, derived, or explicit.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 17

Information Modeling Information Modeling Terminology Terminology (4)(4)

• CardinalityCardinality– Cardinality specifies the number of

instances of a construct that can be associated with one instance of the related construct.• Examples:

– A person has one head and a head can only belong to one person.

– A person can have zero or more children, but a child must have two parents.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 18

Information Modeling Information Modeling Terminology Terminology (5)(5)

• InstanceInstance– An instance is a specific member of a

class, a real world thing, e.g., John Nazemetz is a specific professor, a specific resident of Stillwater, Oklahoma

• Supertypes/SubtypesSupertypes/Subtypes– Super/Sub-types are means of

representing categorization or specialization, i.e., computers (supertype) can be mainframes or PC (subtypes)

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 19

Information Modeling Information Modeling Process Process (1)(1)

• Define Scope/ProblemDefine Scope/Problem• Gather ExpertsGather Experts

– Domain Experts– Modeling Experts

• Expert SynthesisExpert Synthesis– Understanding of Each Others

Terminology– Training

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 20

Information Modeling Information Modeling Process Process (2)(2)

• Develop ModelDevelop Model– Basic Objects

• Identification• Naming

– No synonym, homonyms

• Agreement– Glossary/Data Dictionary

• Identify Attributes of Objects (Minimum Set)• Categorization/Specialization/Generalization• Document Definitions, Representations/Types• Unique Identification of Objects, Existence

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 21

Information Modeling Information Modeling Process Process (3)(3)

• Develop Model (cont.)Develop Model (cont.)– Relationships and Attributes

• Relations between Entities• Inheritance, Specializations• Additional Attributes Needed• Unique Identification

– Completion of Constraints• Global Rules• All Existence/Cardinality Constraints

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 22

Information Modeling Information Modeling Process Process (4)(4)

• Develop Model (cont.)Develop Model (cont.)– Model Integration

• Consistency of All Groups working on Model• Model Optimization

• Use Model in Developing Use Model in Developing Information SystemInformation System

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 23

Information Modeling Information Modeling Languages/MethodsLanguages/Methods (1) (1)

• Entity- Relationship (ER) Diagrams, Entity- Relationship (ER) Diagrams, GEMGEM

• EXPRESS, EXPRESS-GEXPRESS, EXPRESS-G• IDEF1XIDEF1X• NIAM (Nijssen’s Information Analysis NIAM (Nijssen’s Information Analysis

Method) Method) • OMT (Object Modeling Technique)OMT (Object Modeling Technique)• Shlaer-MellorShlaer-Mellor• DAPLEXDAPLEX• SQL (Structured Query Language)SQL (Structured Query Language)• UML (Universal Modeling Language)UML (Universal Modeling Language)

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 24

Information Modeling Information Modeling Languages/MethodsLanguages/Methods (2) (2)

• SimilaritiesSimilarities– Similar Functionality

• Entity • Relationships

– Inheritance– Supertype/Subtype

• DifferencesDifferences– Symbology (Word/Icons)– Syntax (Rules)

Advanced Manufacturing Advanced Manufacturing Systems DesignSystems Design

© 2000 © 2000 John W. NazemetzJohn W. Nazemetz

Lecture 13 Topic :Lecture 13 Topic : Information Information ModelingModeling

Segment A Topic:Segment A Topic: EXPRESS Concepts EXPRESS Concepts

END OF SEGMENTEND OF SEGMENT

Advanced Manufacturing Advanced Manufacturing Systems DesignSystems Design

© 2000 © 2000 John W. NazemetzJohn W. Nazemetz

Lecture 13 Topic :Lecture 13 Topic : Information Information ModelingModeling

Segment B Topic:Segment B Topic: EXPRESS EXPRESS Language Elements Language Elements

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 27

ADVANCED ADVANCED MANUFACTURING MANUFACTURING SYSTEMS DESIGNSYSTEMS DESIGN

Information ModelingInformation Modeling

EXPRESS Language Elements IEXPRESS Language Elements I

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 28

OverviewOverview

• BackgroundBackground– EXPRESS– EXPRESS-G

• Language ElementsLanguage Elements– Schema– Entity– Data Types

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 29

BackgroundBackground

• Early ’80s Concepts Developed as part Early ’80s Concepts Developed as part of USAF PDDI Programof USAF PDDI Program

• Mid-’80s STEP Development BegunMid-’80s STEP Development Begun• ’’86 Formally named EXPRESS to reflect 86 Formally named EXPRESS to reflect

ability to “express data relationships” ability to “express data relationships” by Peter Wilson and Bernd Wenzelby Peter Wilson and Bernd Wenzel

• Developed as ISO 10303-11Developed as ISO 10303-11• EXPRESS-G DevelopedEXPRESS-G Developed• Commercial Compilers, Editors Commercial Compilers, Editors

AvailableAvailable

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 30

Goals/Use of EXPRESSGoals/Use of EXPRESS

• Same as Any Information Modeling Same as Any Information Modeling LanguageLanguage– Enable Formal Specification of

Information Models– Provide Precise Information Model as

Precursor to Information System Development

– Provide a Means to Define an Application/ Implementation Independent Information Model

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 31

EXPRESS EXPRESS (1)(1)

• Main ElementsMain Elements– Schema

• Containers for Model, Sub-models

– Entities• The Real World “Things” of Interest

– Types (Datatypes)• Representations of value domains• User-Defined or Built-in (REAL, INTEGER, ..)

– Rules• Description of Entity and Entity Value

Interactions

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 32

EXPRESS EXPRESS (2)(2)

• Other ConceptsOther Concepts– Supertypes/Subtypes

• Allow Generalization/Specialization (Categorization)

– Inheritance• All Attributes/Constraints on/of Supertype

apply to Subtype

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 33

EXPRESS EXPRESS (3)(3)

• Other Concepts (cont.)Other Concepts (cont.)– Identity

• Attributes to identify values/access keys are NOT modeled (Model separate from implementation)

• Every value of every entity is type will have a unique identifier, but the form of the identifier is not important to the information modeling process

• Some Attributes may be key-candidates (uniqueness constraints).

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 34

SCHEMA

• Larger Object than Larger Object than EntitiesEntities

• Partitions Entities Partitions Entities into Groupsinto Groups

• Defines Scope Within Defines Scope Within Which (Related) Which (Related) Entities are DeclaredEntities are Declared– Can USE/REFERENCE

• Order of Objects in Order of Objects in Schema UnimportantSchema Unimportant

SCHEMA iem_5303; ENTITY instructor;

. . . END_ENTITY;

TYPE student = ... . . . END_TYPE;

ENTITY on_campus_student;. . .

END_ENTITY;END_SCHEMA;

iem_5303

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 35

ENTITY

• Basic Unit in Basic Unit in EXPRESSEXPRESS

• Represents a Represents a Class of ObjectsClass of Objects– Common

Properties

• Declaration of an Declaration of an Entity Defines an Entity Defines an Entity Type and Entity Type and its identifier its identifier (name).(name).

ENTITY student; SUPERTYPE OF (ONE OF (

stillwater_student;tulsa_student;video_student));

first_name : STRING; last_name : STRING; student_id : UNIQUE INTEGER; home_address: location; grade_pt_avg: REAL;END_ENTITY;

student

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 36

ATTRIBUTES

• Fact (about an Fact (about an entity)entity)

• Specified by Specified by role_namerole_name and and data_type.data_type.

• Defines/Defines/Establishes a Establishes a Relationship Relationship between entity between entity and another objectand another object

ENTITY stillwater_student; SUBTYPE OF student; campus_address : location; assistantship : OPTIONAL

BOOLEAN;END_ENTITY;

stillwater_student

location

BOOLEAN

campus_address

assistantship

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 37

Data TypesData Types

• Data Type Controls/Declares the Data Type Controls/Declares the Representation of an AttributeRepresentation of an Attribute

• Six Classes of Data TypesSix Classes of Data Types– Simple– Entity– Defined– Enumeration– Select– Aggregation

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 38

Simple Data TypesSimple Data Types

• Lowest (“Atomic”) LevelLowest (“Atomic”) Level• Five Simple Data Types in ClassFive Simple Data Types in Class

– BOOLEAN– LOGICAL– BINARY– STRING– NUMBER: INTEGER, REAL

• Symbol -> Symbol -> Simple Data Type

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 39

Entity Data Types Entity Data Types (1)(1)

• Entity May Entity May Serve as the Serve as the Data Type of Data Type of an Attribute an Attribute of an Entityof an Entity

• Establishes a Establishes a Relationship Relationship Between Between Two EntitiesTwo Entities

ENTITY stillwater_student; . . . campus_address : location; . . .END_ENTITY;

ENTITY location;street : STRING;

city : STRING; state : STRING; country : OPTIONAL STRING; postal_zone: STRING;END_ENTITY

Entity Data Type

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 40

Entity Data Types Entity Data Types (2)(2)

stillwater_student

location

BOOLEAN

campus_address

assistantship

street

city

state

postal_zone

STRING

STRING

STRING

STRING

countrySTRING

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 41

ATTRIBUTES

• Fact (about an Fact (about an entity)entity)

• Specified by Specified by role_namerole_name and and data_type.data_type.

• Defines/Defines/Establishes a Establishes a Relationship Relationship between entity between entity and another objectand another object

ENTITY on_campus_student; campus_address : location;END_ENTITY;

on_campus_student

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 42

Defined Data Type

Defined Data Types Defined Data Types (1)(1)• Create with Create with

TYPE TYPE DeclarationDeclaration

• Rename Simple Rename Simple Types or Types or slightly more slightly more complex typescomplex types

• Distinguishes Distinguishes Different Different Things with Things with Same Same RepresentationRepresentation

ENTITY student; . . . expected_graduation: date; . . .END_ENTITY;

TYPE date = ARRAY [1:3] OF INTEGER;WHERE

WR1: 1898 <= SELF[1] WR2: 1 <= SELF[2] <= 12;

WR3: 1 <= SELF[3] <= 31;

END_TYPE

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 43

Defined Data Types Defined Data Types (2)(2)

dateexpected_graduation A [1:3]

INTEGERstudent

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 44

ENUMERATIONENUMERATION Data Type Data Type (1)(1)

• Simple List of Simple List of Item that are Item that are Valid Attribute Valid Attribute ValuesValues

• Each Item is Each Item is simply a labelsimply a label

• Must be a Must be a Defined TypeDefined Type

• A Terminal A Terminal EXPRESS ObjectEXPRESS Object

ENTITY student; . . . classification: degree; . . .END_ENTITY;

TYPE degree = ENUMERATION OF (bachelors;

masters; ph_d);

END_TYPE

Enumeration_type

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 45

ENUMERATIONENUMERATION Data Type Data Type (2)(2)

degreeclassificationstudent

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 46

SELECT SELECT Data Type Data Type (1)(1)

• Used to Indicate a Used to Indicate a Reference to One Reference to One of a Set of Entitiesof a Set of Entities

• Set of Entities Set of Entities known as the known as the Select ListSelect List

• Can Only Use in Can Only Use in TYPE DeclarationTYPE Declaration

Select_data_type

ENTITY student; . . . sex : role; gender : SET [0:2] OF

role; . . .END_ENTITY;

TYPE role = SELECT (male;

female);END_TYPE

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 47

SELECTSELECT Data Type Data Type (2)(2)

rolesexstudent

male female

Advanced Manufacturing Advanced Manufacturing Systems DesignSystems Design

© 2000 © 2000 John W. NazemetzJohn W. Nazemetz

Lecture 13 Topic :Lecture 13 Topic : Information Information ModelingModeling

Segment B Topic:Segment B Topic: EXPRESS EXPRESS Language ElementsLanguage Elements

END OF SEGMENTEND OF SEGMENT

Advanced Manufacturing Advanced Manufacturing Systems DesignSystems Design

© 2000 © 2000 John W. NazemetzJohn W. Nazemetz

Lecture 13 Topic :Lecture 13 Topic : Information Information ModelingModeling

Segment C Topic:Segment C Topic: EXPRESS EXPRESS Language Elements IILanguage Elements II

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 50

ADVANCED ADVANCED MANUFACTURING MANUFACTURING SYSTEMS DESIGNSYSTEMS DESIGN

Information ModelingInformation Modeling

EXPRESS Language EXPRESS Language Elements IIElements II

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 51

OverviewOverview

• Aggregation TypesAggregation Types• Derived Attributes and FunctionsDerived Attributes and Functions• RelationshipsRelationships• CardinalityCardinality• RulesRules• SUBTYPE/SUPERTYPESUBTYPE/SUPERTYPE• USE/REFERENCEUSE/REFERENCE

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 52

Aggregation Data Aggregation Data TypesTypes

• Allows an Attribute to have Multiple Allows an Attribute to have Multiple Values for a single role nameValues for a single role name

• Represents collections of base types Represents collections of base types (simple, entity, defined)(simple, entity, defined)

• Number of Elements “Bounded” Number of Elements “Bounded” [m:n][m:n]

• Four KindsFour Kinds– ARRAY - SET– LIST - BAG

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 53

ARRAYARRAY Aggregation Data Aggregation Data TypeType

• Fixed in Size (Bounds Fixed in Size (Bounds are INTEGER values)are INTEGER values)

• Indexing/Ordering Indexing/Ordering ImportantImportant

• Values may be Values may be ControlledControlled– OPTIONAL -> Can be NULL– UNIQUE -> All Elements in

Array must be UNIQUE

TYPE matrix = ARRAY [1:4] OF ARRAY

[1:4] OF REAL;END_TYPE;

- - this defines a 4x4 matrix of real numbers, all elements must be real numbers (null not allowed), values can be repeated.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 54

LISTLIST Aggregation Data Aggregation Data TypeType

• Variable in Size Variable in Size – [0,?] Assumed if not

Specified

• Ordered/SequencedOrdered/Sequenced• Duplicates AllowedDuplicates Allowed• Values may be Values may be

ControlledControlled– UNIQUE -> Will not allow

duplicates in LIST

ENTITY student; . . . plan_of_study : LIST

[1:?] OF semester_plans . . .END_ENTITY;

TYPE semester_plans = SELECT (req_course; elective_course; prereq_course);

END_TYPE

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 55

BAGBAG Aggregation Data Aggregation Data TypeType

• Variable in Variable in SizeSize– [0,?]

Assumed if not Specified

• Not OrderedNot Ordered• Duplicates Duplicates

AllowedAllowed

ENTITY student; . . . osu_courses_taken : BAG [0:?] OF

transcript_entry; WHERE

transcript_entry.student_id = student_id;

. . .END_ENTITY;

ENTITY transcript_entry; course_id : INTEGER; student_id : INTEGER;

grade_given : STRING;END_ENTITY;

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 56

SETSET Aggregation Data Aggregation Data TypeType

• Variable in SizeVariable in Size– [0,?] Assumed if not

Specified

• Not OrderedNot Ordered• Duplicates Not Duplicates Not

AllowedAllowed

ENTITY course; . . . course_id : STRING;

prerequisites : SET [0:?] OF course;

. . .END_ENTITY;

course

prerequisite S[0:?]

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 57

DERIVEDDERIVED Attribute Attribute (1)(1)

• Value Value Computed Computed from Values from Values of Other of Other AttributesAttributes

• Must be Must be Type Type Compatible Compatible with Derived with Derived Attribute Attribute TypeType

ENTITY transcript_entry; course_id : INTEGER; student_id : INTEGER;

grade_given : INTEGER; credit_hours : INTEGER

DERIVE quality_pts : INTEGER :=

grade_given * credit_hours; . . .

END_ENTITY;

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 58

DERIVEDDERIVED Attribute Attribute (2)(2)

INTEGER(DER) quality_ptsTranscript_entry

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 59

DERIVEDDERIVED Attribute Attribute (3)(3)

ENTITY transcript_entry; course_id : INTEGER; student_id : INTEGER; grade_given : STRING; credit_hours : INTEGER DERIVE multiplier : INTEGER := convert_letter_grade (grade_given); DERIVE quality_pts : INTEGER := multiplier * credit_hours; END_ENTITY;

FUNCTION convert_letter_grade (letter:STRING):INTEGER;(* Returns 4 if A, 3 if B, ...)END_FUNCTION

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 60

Relationships Relationships (1)(1)• Represented by Lines in EXPRESS-GRepresented by Lines in EXPRESS-G

– From entity to object, can inverse

• Each attribute establishes a Each attribute establishes a relationship between the entity and relationship between the entity and another object.another object.

• Can be association between entitiesCan be association between entities• Can apply between entity and other Can apply between entity and other

data types (i.e., simple data types)data types (i.e., simple data types)

INTEGER(DER) quality_ptsTranscript_entry

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 61

Relationships Relationships (2)(2)• Each relationship in a schema Each relationship in a schema

corresponds to zero or more corresponds to zero or more relationships between an instance relationships between an instance of the entity and another object.of the entity and another object.– Cardinality

• Exists in Both Directions• Expressed via

– Aggregations– Modifiers (OPTIONAL)– INVERSE

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 62

Relationship CardinalitiesRelationship Cardinalities (1)(1)

• [1:1] , [1:1] , [0:?][0:?] ownsperson house

ENTITY person; . . . owns : house;

. . . END_ENTITY;

Each person owns exactly one house.

[1:1] Explicitly stated

ENTITY house; . . .END_ENTITY;

Each house can be owned by zero or more persons.

INVERSE [0,?] implied.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 63

Relationship CardinalitiesRelationship Cardinalities (2)(2)

• [[11:3] , :3] , [0:?][0:?] Owns S[1:3]person house

ENTITY person; . . . owns : OPTIONAL S[1:3]

house; . . .

END_ENTITY;

Each person owns zero to 3 houses.

[1:3] Explicitly stated, buy modified by OPTIONAL to [0:3]

ENTITY house; . . .END_ENTITY;

Each house can be owned by zero or more persons.

INVERSE [0,?] implied.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 64

Relationship CardinalitiesRelationship Cardinalities (3)(3)

• [0:3] , [0:3] , [0:?][0:?] owns S[0:3]person house

ENTITY person; . . . owns : SET [0:3] OF

house; . . .

END_ENTITY;

Each person owns zero to 3 houses.

[0:3] Explicitly stated

ENTITY house; . . .END_ENTITY;

Each house can be owned by zero or more persons.

INVERSE [0,?] implied.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 65

Relationship CardinalitiesRelationship Cardinalities (4)(4)

• [[11:?] , :?] , [0:?][0:?] owns S[1:?]person house

ENTITY person; . . . owns : OPTIONAl SET

[1:?] OF house; . . .

END_ENTITY;

Each person owns zero or more house.

[1:?] Explicitly stated, Modified by OPTIONAL to [0:?]

ENTITY house; . . .END_ENTITY;

Each house can be owned by zero or more persons.

INVERSE [0,?] implied.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 66

Relationship CardinalitiesRelationship Cardinalities (5)(5)

• [0:?], [1:?][0:?], [1:?] owns S[0:?]person house

ENTITY person; . . . owns : SET [0:?] OF

house; . . .

END_ENTITY;

Each person owns zero or more house.

[0:?] Explicitly stated,

ENTITY house; . . . owners ; S[1:?] OF personEND_ENTITY;

Each house can/must be owned by one or more persons.

INVERSE [1:?] explicitly stated.

(INV) owners S[1:?]

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 67

Relationship CardinalitiesRelationship Cardinalities (6)(6)

• [0:?] , [0:?] , [1:?] [1:?] Owners S [1:?]person house

ENTITY person; . . .

END_ENTITY;

Each person owns zero or more house.

[0:?] Inverse Implicitly stated,

Good Practice: Model Good Practice: Model More Restrictive More Restrictive Cardinality Explicitly.Cardinality Explicitly.

ENTITY house; . . . owners : SET

[1:?] OF person; . . .END_ENTITY;

Each house is owned by one or more persons.

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 68

Local RulesLocal Rules

• Constraints Constraints on values that on values that attributes attributes may have.may have.

• Used to State Used to State Validity Validity Assertions.Assertions.

• UNIQUE UNIQUE AssertionAssertion

ENTITY student; . . . expected_graduation: date; . . .END_ENTITY;

TYPE date = ARRAY [1:3] OF INTEGER;WHERE

WR1: 1898 <= SELF[1] WR2: 1 <= SELF[2] <= 12;

WR3: 1 <= SELF[3] <= 31;

END_TYPE

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 69

Subtype/Supertype Subtype/Supertype (1)(1)

• Relationship between entities with Relationship between entities with similar properties, belong to same similar properties, belong to same class.class.

• Two or more subtypes (children) share Two or more subtypes (children) share properties of supertype (parent)properties of supertype (parent)

• An entity may be a supertype of An entity may be a supertype of multiple entities and may be a subtype multiple entities and may be a subtype of multiple entities.of multiple entities.– Known as (Partial) Complex Entities

• Symbol – Thick or Double LineSymbol – Thick or Double Line

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 70

Subtype/Supertype Subtype/Supertype (2)(2)

• Relationships Between SubtypesRelationships Between Subtypes– Specified in the Supertype Statement– Three Types of inter-subtype Relations

• ONEOF• ANDOR (Default if not Specified)• AND

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 71

Subtype/Supertype Subtype/Supertype (3)(3)

ENTITY student; SUPERTYPE OF (ONE OF (

stillwater_student;tulsa_student;video_student));

first_name : STRING; last_name : STRING; student_id : UNIQUE

INTEGER; home_address: location; grade_pt_avg: REAL;END_ENTITY;

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 72

Subtype/Supertype Subtype/Supertype (4)(4)

1

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 73

Abstract SupertypeAbstract Supertype

• Provides Ability to Classify Other Provides Ability to Classify Other EntitiesEntities

• Can Never Be Directly Instantiated – Can Never Be Directly Instantiated – May only appear as one of its subtypesMay only appear as one of its subtypes

• May have Attributes and Constraints May have Attributes and Constraints and these are inherited by all subtypes.and these are inherited by all subtypes.– In model, student is Abstract Supertype if

subtypes all inclusive– Instantiable Supertype if student can exist

who is not stillwater, tulsa, or video

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 74

Use/ReferenceUse/Reference• Provides Ability to Relate Entities in Provides Ability to Relate Entities in

Different SchemaDifferent Schema– USE (USE entities from IRs – STEP)

• Make Foreign Declarations Appear Local

– REFERENCE (REF – interconnect IRs – STEP)• Objects Visible But Not Considered Local• Used to Resolve External References• USE REFERENCE

Entity Entity

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 75

EXPRESS Reserved EXPRESS Reserved WordsWords (1) (1)

Abs Abstract ACos Aggregate Alias

And AndOr Array As ASin

ATan Bag Begin Binary BLength

Boolean By Case Constant Const_E

Context Cos Derive Div Else

End End_Alias End_Case End_Constant End_Context

End_Entity End_Function End_If End_Local End_Model

End_Procedure

End_Repeat End_Rule End_Schema End_Type

Entity Enumeration Escape Exists Exp

False Fixed For Format From

Function Generic HiBound HiIndex If

In Insert Integer Inverse Length

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 76

EXPRESS Reserved EXPRESS Reserved WordsWords (2) (2)

Like List LoBound Local Log

Log10 Log2 Logical LoIndex Mod

Model Not Number NVL Odd

Of OneOf Optional Or Otherwise

Pi Procedure Query Real Reference

Remove Repeat Return RolesOf Rule

Schema Select Self Set Sin

SizeOf Skip Sqrt String Subtype

Supertype Tan Then To True

Type TypeOf Unique Unknown Until

Use UsedIn Value Var Where

While XOr

Computer Integrated Manufacturing Systems © 2000 John W. NazemetzSlide 77

Operator/PrecedenceOperator/PrecedencePrecedencPrecedenc

eeDescriptionDescription OperatorOperator

11 Component Component ReferencesReferences

[ ] . \[ ] . \

22 Prefix OperatorsPrefix Operators + - Not+ - Not

33 ExponentiationExponentiation ****

44 Multiplication/Multiplication/DivisionDivision

* / Div Mod And* / Div Mod And

55 Addition/Addition/SubtractionSubtraction

- + Or XOr- + Or XOr

66 RelationalRelational = <> <= = <> <= >= :=: :<>: In >= :=: :<>: In

LikeLike

77 CommentsComments -- (* *)-- (* *)

Advanced Manufacturing Advanced Manufacturing Systems DesignSystems Design

© 2000 © 2000 John W. NazemetzJohn W. Nazemetz

Lecture 13 Topic :Lecture 13 Topic : Information Information Exchange in a Virtual WorldExchange in a Virtual World

Segment C Topic:Segment C Topic: EXPRESS EXPRESS Language Elements II Language Elements II

END OF SEGMENTEND OF SEGMENT