Transcript
Page 1: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

11

Domain ModelsDomain Models

A line manager asks, A line manager asks, “These consultants and “These consultants and their models. I thought they were toys at first their models. I thought they were toys at first and then one of the consultants told me that and then one of the consultants told me that

they were semantic representations of business they were semantic representations of business problems. I said, it sounds like Greek to me. He problems. I said, it sounds like Greek to me. He said, exactly – the giving of signs. I’m sure the said, exactly – the giving of signs. I’m sure the

guy’s a closet mason.”guy’s a closet mason.”

Page 2: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 22

Domain ModelsDomain Models

Define modelingDefine modeling Build table modelsBuild table models Define binary and n-ary relationsDefine binary and n-ary relations Types of binary relationsTypes of binary relations Build model of tablesBuild model of tables Define history of modelingDefine history of modeling Define 5 modeling techniquesDefine 5 modeling techniques

Page 3: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 33

Define modelingDefine modelingSection #1Section #1

Define modelsDefine models Define semanticsDefine semantics Define data modelsDefine data models Pros and cons of data modelsPros and cons of data models

Page 4: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 44

Define modelsDefine models

Models are:Models are: Physical representations of things, like scale models of Physical representations of things, like scale models of

houses, cars, airplanes, boats, et cetera.houses, cars, airplanes, boats, et cetera. Abstract representations of ideas, like programming models Abstract representations of ideas, like programming models

or data models.or data models. Concrete models are:Concrete models are:

Built to provide visualization of something before building it.Built to provide visualization of something before building it. Built to test concepts, like aerodynamics or hydrodynamics. Built to test concepts, like aerodynamics or hydrodynamics.

Abstract models are:Abstract models are: Built as theoretical constructs that represent processes.Built as theoretical constructs that represent processes. Built by defining logical variables and quantitative Built by defining logical variables and quantitative

relationships between the variables.relationships between the variables. Built sometimes to simulate behavior, like a flight simulator.Built sometimes to simulate behavior, like a flight simulator.

Page 5: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 55

Define semanticsDefine semantics

Semantics is:Semantics is: The representation of ideas in words, symbols, or signs.The representation of ideas in words, symbols, or signs. The communication of ideas through sensory devices, like The communication of ideas through sensory devices, like

sight, sound, or touch.sight, sound, or touch. The representation of ideas by using pragmatics, which is the The representation of ideas by using pragmatics, which is the

explanatory gap between a representation and understanding. explanatory gap between a representation and understanding. It is like the glue that let’s you understand the context of what It is like the glue that let’s you understand the context of what somebody says or writes.somebody says or writes.

Semantics models are:Semantics models are: Built to provide visualization of something before building a Built to provide visualization of something before building a

model of it.model of it. Built to test concepts, like whether you want an object to fly or Built to test concepts, like whether you want an object to fly or

float. float. Abstract semantic models are:Abstract semantic models are:

Built as theoretical constructs to represent processes.Built as theoretical constructs to represent processes. Built by using logical pragmatics to define a problem context.Built by using logical pragmatics to define a problem context. Built sometimes to define a concept, like a conceptual behavior Built sometimes to define a concept, like a conceptual behavior

that cannot be readily represented in a real or concrete model.that cannot be readily represented in a real or concrete model.

Page 6: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 66

Define data modelsDefine data modelsSubsection #1-3Subsection #1-3

Generic requirementsGeneric requirements Prototype model definitionPrototype model definition Entity Relational Diagram (ERD)Entity Relational Diagram (ERD) UML prototype model.UML prototype model. Build prototypes using an IDE.Build prototypes using an IDE.

Page 7: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 77

Generic requirementsGeneric requirements

Models require semantics:Models require semantics: A common vocabulary, or set of primitives.A common vocabulary, or set of primitives. A common language, or set of vocabulary.A common language, or set of vocabulary. A common grammar, or means of organizing vocabulary in a A common grammar, or means of organizing vocabulary in a

language.language. A common denotation, or the ability to read and assign A common denotation, or the ability to read and assign

meaning.meaning. A common connotation, or the ability to interpret usage.A common connotation, or the ability to interpret usage. A common pragmatics, or the ability to assert context to A common pragmatics, or the ability to assert context to

interpreted meaning.interpreted meaning. Models should read like a story:Models should read like a story:

They should use some colloquialisms.They should use some colloquialisms. They should use some precise symbols. They should use some precise symbols. They should balance the use of colloquialisms and precise They should balance the use of colloquialisms and precise

symbols to communicate ideas.symbols to communicate ideas.

Page 8: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 88

Prototype model definitionPrototype model definition

Define a table by:Define a table by: Describing the column names.Describing the column names. Describing the column data types.Describing the column data types. Describing the column constraints.Describing the column constraints.

Name the constraints.Name the constraints. Define as in-line or out-of-line constraints.Define as in-line or out-of-line constraints.

Define a table’s primary and foreign keys:Define a table’s primary and foreign keys: Identify natural keys.Identify natural keys. Identify candidate keys.Identify candidate keys. Pick a candidate key as a primary key. Pick a candidate key as a primary key. Identify foreign keys and the column in the same or Identify foreign keys and the column in the same or

another table that holds the list of valid primary keys.another table that holds the list of valid primary keys.

Page 9: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 99

Entity Relationship Diagram Entity Relationship Diagram (ERD)(ERD)

Does describes the Does describes the table name at the top table name at the top of the diagram.of the diagram.

Does describes the Does describes the primary key column as primary key column as an underlined column an underlined column name separately from name separately from non-key column non-key column names.names.

Does not describe Does not describe data types.data types.

INDIVIDUAL

PK INDIVIDUAL_ID

FIRST_NAME MIDDLE_NAME LAST_NAME CREATED_BY CREATION_DATE LAST_UPDATED_BY LAST_UPDATE_DATE

Page 10: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1010

UML prototype modelUML prototype model

Does describes the Does describes the table name at the top table name at the top of the diagram.of the diagram.

Does not describes the Does not describes the primary key column primary key column differently from non-differently from non-key column names.key column names.

Does describe data Does describe data types.types.

#INDIVIDUAL_ID : NUMBER#FIRST_NAME : VARCHAR2#MIDDLE_NAME : VARCHAR2#LAST_NAME : VARCHAR2#CREATED_BY : NUMBER#CREATION_DATE : DATE#LAST_UPDATED_BY : NUMBER#LAST_UPDATE_DATE : DATE

INDIVIDUAL

Page 11: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1111

Build prototypes using IDEBuild prototypes using IDE

Page 12: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1212

Define data modelsDefine data modelsReview Subsection #1-3Review Subsection #1-3

Generic requirementsGeneric requirements Prototype model definitionPrototype model definition Entity Relational Diagram (ERD)Entity Relational Diagram (ERD) UML prototype model.UML prototype model. Build prototypes using an IDE.Build prototypes using an IDE.

Page 13: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1313

Pros and cons of data Pros and cons of data modelsmodels

Pros:Pros: The table domains are well defined.The table domains are well defined. The primary, superkeys, foreign keys are known.The primary, superkeys, foreign keys are known. The tables can now support model relationships.The tables can now support model relationships. The design is less expensive than writing the solution.The design is less expensive than writing the solution.

Cons:Cons: Defining the table domains takes time.Defining the table domains takes time. The design becomes progressively complex. The design becomes progressively complex. Communicating the model takes longer than coding Communicating the model takes longer than coding

it.it.

Page 14: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1414

Define modelingDefine modelingReview Section #1Review Section #1

Define modelsDefine models Define semanticsDefine semantics Define data modelsDefine data models Pros and cons of data modelsPros and cons of data models

Page 15: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1515

Build table modelsBuild table models

Tables are:Tables are: 2 dimensional structures that contain raw data.2 dimensional structures that contain raw data. The 1The 1stst dimension is the row, which lets you select records. dimension is the row, which lets you select records. The 2The 2ndnd dimension, or nested dimension, is defined by the column dimension, or nested dimension, is defined by the column

names, which lets you project across or filter record selection.names, which lets you project across or filter record selection. Table names are:Table names are:

Singular nouns or a set of singular nouns separated by underscores.Singular nouns or a set of singular nouns separated by underscores. Limited by the maximum implementation size of various database Limited by the maximum implementation size of various database

management system products.management system products. Column names are:Column names are:

Singular nouns or a set of singular nouns separated by underscores.Singular nouns or a set of singular nouns separated by underscores. Limited by the maximum implementation size of various database Limited by the maximum implementation size of various database

management system products.management system products. Columns require:Columns require:

Defined data types that include physical size allocation.Defined data types that include physical size allocation.

Page 16: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1616

Define binary and n-ary Define binary and n-ary relationsrelations

Binary relations:Binary relations: Exist between two things.Exist between two things. Are described by two sentences because there are two Are described by two sentences because there are two

perspectives.perspectives. The subject is the starting point and the direct object is the ending The subject is the starting point and the direct object is the ending

point for each sentence.point for each sentence. Each object is a subject in one sentence and a direct object in the Each object is a subject in one sentence and a direct object in the

other.other.

N-ary relations (N-ary relations (nn is the number of objects in the relation): is the number of objects in the relation): Exist between three or more things.Exist between three or more things. Each object in an n-ary relation has a binary relation with Each object in an n-ary relation has a binary relation with n – 1n – 1

other objects.other objects. Are described by 2Are described by 2nn sentences because there are 2 sentences because there are 2nn perspectives. perspectives. The subject is the starting point and the direct object is the ending The subject is the starting point and the direct object is the ending

point for each sentence.point for each sentence. Each object is a subject in one Each object is a subject in one nn sentences and a direct object in sentences and a direct object in nn

other sentences.other sentences.

Page 17: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1717

Types of binary relationsTypes of binary relations

One-to-one:One-to-one: One row in the subject relates to one row in the One row in the subject relates to one row in the

direct object.direct object. One-to-many:One-to-many:

One row in the subject relates to one or more One row in the subject relates to one or more rows in the direct object.rows in the direct object.

Many-to-many:Many-to-many: One or more rows in the subject relates to one One or more rows in the subject relates to one

or more rows in the direct object and vice versa.or more rows in the direct object and vice versa.

Page 18: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1818

Build model of tablesBuild model of tables

Tables are:Tables are: 2 dimensional structures that contain raw data.2 dimensional structures that contain raw data. The 1The 1stst dimension is the row, which lets you select records. dimension is the row, which lets you select records. The 2The 2ndnd dimension, or nested dimension, is defined by the column dimension, or nested dimension, is defined by the column

names, which lets you project across or filter record selection.names, which lets you project across or filter record selection. Relations are:Relations are:

Connections between two objects.Connections between two objects. Are described by two sentences because there are two perspectives.Are described by two sentences because there are two perspectives. The subject is the starting point and the direct object is the ending The subject is the starting point and the direct object is the ending

point for each sentence.point for each sentence. Each object is a subject in one sentence and a direct object in the Each object is a subject in one sentence and a direct object in the

other.other. Relations are annotated:Relations are annotated:

A verb describes the relations between one object and another.A verb describes the relations between one object and another. Adverbs qualify the relations.Adverbs qualify the relations.

Cardinality describes:Cardinality describes: The minimum number of rows affected – minimum cardinality (old word The minimum number of rows affected – minimum cardinality (old word

ordinality).ordinality). The maximum number of rows affected – maximum cardinality (old The maximum number of rows affected – maximum cardinality (old

word cardinality).word cardinality).

Page 19: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 1919

Define history of modelingDefine history of modelingSection 6Section 6

BeginningBeginning ImprovementImprovement RegulationRegulation Private sector regains controlPrivate sector regains control

Page 20: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2020

Define history of modelingDefine history of modeling

Beginning:Beginning: The history of modeling techniques began with The history of modeling techniques began with

a method proposed by Peter Chen in 1976, a method proposed by Peter Chen in 1976, which became the E-R model.which became the E-R model.

The first model uses diamonds to hold a The first model uses diamonds to hold a relationship map between conceptual entities.relationship map between conceptual entities.

Charles Bachman and James Martin proposed Charles Bachman and James Martin proposed some changes, which were some changes, which were incorporated into the Extended ER modelincorporated into the Extended ER model, , which was established in 1986 by academe which was established in 1986 by academe papers.papers.

Page 21: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2121

Define history of modelingDefine history of modeling

Improvement:Improvement: Bachman and Martin innovation includes the use of Bachman and Martin innovation includes the use of

perpendicular lines.perpendicular lines. Martin furthered the method, which became known as a Martin furthered the method, which became known as a

component of component of Information Engineering (IE)Information Engineering (IE). IE was a . IE was a Software Development Life-cycle methodology Software Development Life-cycle methodology popularized in the late 1980s and early 1990s.popularized in the late 1980s and early 1990s.

It was replaced by the It was replaced by the NIST/ECMA Unified ProcessNIST/ECMA Unified Process, which , which uses UML.uses UML.

The symbols of Bachman and Martin adopted into the The symbols of Bachman and Martin adopted into the Extended ER model are the perpendicular zeros and Extended ER model are the perpendicular zeros and lines denoting respectively minimum and maximum lines denoting respectively minimum and maximum cardinality.cardinality.

Page 22: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2222

Define history of modelingDefine history of modeling

Regulation:Regulation: The Department of Defense (DoD) pushed for The Department of Defense (DoD) pushed for

the standardization of modeling for information the standardization of modeling for information system contracts in the 1980s.system contracts in the 1980s.

This led to the definition of a competing This led to the definition of a competing standard to Information Engineering, which is standard to Information Engineering, which is known as IDEF1X. The National Institute of known as IDEF1X. The National Institute of Standards and Technology introduced IDEF1X in Standards and Technology introduced IDEF1X in 1993.1993.

IDEF1X has principally been used by DoD IDEF1X has principally been used by DoD contractors and the contractors and the ERWinERWin Computer-aided Software Engineering (CASE)Computer-aided Software Engineering (CASE) tool.tool.

Page 23: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2323

Define history of modelingDefine history of modeling

Private sector regains control:Private sector regains control: Concurrently with the development of IDEF1X, Concurrently with the development of IDEF1X,

National Institute of Standards and Technology (NIST)National Institute of Standards and Technology (NIST) and and ECMAECMA were developing a framework for were developing a framework for Software Engineering EnvironmentsSoftware Engineering Environments, which became the , which became the Unified Process.Unified Process.

The Unified Process (UP) is the common framework set The Unified Process (UP) is the common framework set by both American and European standards committees.by both American and European standards committees.

UP adopted UML as the standard representation UP adopted UML as the standard representation semantic for all facets of modeling.semantic for all facets of modeling.

UP became formally adopted in 1996 and is widely used UP became formally adopted in 1996 and is widely used in Rapid Application Development (RAD) and eXtreme in Rapid Application Development (RAD) and eXtreme Programming (XP) development activities.Programming (XP) development activities.

Page 24: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2424

Define history of modelingDefine history of modelingReview Section 6Review Section 6

BeginningBeginning ImprovementImprovement RegulationRegulation Private sector regains controlPrivate sector regains control

Page 25: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2525

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

Original E-ROriginal E-R Extended E-RExtended E-R Information Engineering (IE)Information Engineering (IE) IDEF1XIDEF1X Unified Modeling Language (UML)Unified Modeling Language (UML)

Page 26: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2626

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

Original E-ROriginal E-R Entities are drawn as rectangles and Entities are drawn as rectangles and

relationships are qualified in diamonds relationships are qualified in diamonds connected by lines to the entities.connected by lines to the entities.

Rectangles have square corners when they Rectangles have square corners when they represent strong entities and rounded corners represent strong entities and rounded corners when they represent weak entities.when they represent weak entities.

There is no formal way to:There is no formal way to: Represent minimum cardinality, orRepresent minimum cardinality, or Represent limited or specialized context for Represent limited or specialized context for

maximum cardinality. You manage these as notes. E-maximum cardinality. You manage these as notes. E-R model does not support categories or subtypes.R model does not support categories or subtypes.

Page 27: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2727

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

Extended E-RExtended E-R Entities are drawn as rectangles and Entities are drawn as rectangles and

relationships, where the relationships are relationships, where the relationships are qualified by a combination of diamonds and qualified by a combination of diamonds and perpendicular lines or circles.perpendicular lines or circles.

Extended E-R uses:Extended E-R uses: Perpendicular zero to represent a minimum Perpendicular zero to represent a minimum

cardinality of zero, known as a may have relationship.cardinality of zero, known as a may have relationship. Pperpendicular lines to represent minimum Pperpendicular lines to represent minimum

cardinality of one, known as a must have relationshipcardinality of one, known as a must have relationship Extended E-R uses a diamond to display generalized Extended E-R uses a diamond to display generalized

binary relationships.binary relationships.

Page 28: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2828

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7 Extended E-R (continued)Extended E-R (continued)

Rectangles have square corners when they represent strong Rectangles have square corners when they represent strong entities and rounded corners when they represent weak entities.entities and rounded corners when they represent weak entities.

While rectangles should use this approach, it is violated because While rectangles should use this approach, it is violated because some inexpensive diagramming tools because they chose not to some inexpensive diagramming tools because they chose not to support it.support it.

When maximum cardinality is different than a generalized many, When maximum cardinality is different than a generalized many, then it is noted next to the entity rectangle in a UML-like format.then it is noted next to the entity rectangle in a UML-like format.

An ID-dependent relationship is represented by two perpendicular An ID-dependent relationship is represented by two perpendicular lines, drawn next to the parent of the relationship.lines, drawn next to the parent of the relationship.

Extended E-R model does support categories or subtypes and Extended E-R model does support categories or subtypes and labels them as categories.labels them as categories.

Categories inherit from their parent.Categories inherit from their parent.

Page 29: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 2929

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

Information Engineering (IE)Information Engineering (IE) Entities are drawn as rectangles and Entities are drawn as rectangles and

relationships are qualified without diamonds in relationships are qualified without diamonds in Information Engineering (IE)Information Engineering (IE) models. models.

Extended E-R uses:Extended E-R uses: Perpendicular zero to represent a may have Perpendicular zero to represent a may have

relationship.relationship. Perpendicular lines to represent a must have Perpendicular lines to represent a must have

relationship.relationship. A less than symbol pointed toward the entity to A less than symbol pointed toward the entity to

represent a many row relationship.represent a many row relationship.

Page 30: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 3030

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

IE (continue)IE (continue) Rectangles have square corners when they Rectangles have square corners when they

represent strong entities and rounded corners represent strong entities and rounded corners when they represent weak entities.when they represent weak entities.

When maximum cardinality is different than a When maximum cardinality is different than a generalized many, then it is noted next to the generalized many, then it is noted next to the entity rectangle in a UML-like format.entity rectangle in a UML-like format.

An ID-dependent relationship is represented by An ID-dependent relationship is represented by two perpendicular lines.two perpendicular lines.

IE model does support categories or subtypes IE model does support categories or subtypes and labels them as subtypes.and labels them as subtypes.

Subtypes inherit from their parent.Subtypes inherit from their parent.

Page 31: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 3131

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

IDEF1XIDEF1X Entities are drawn as rectangles and Entities are drawn as rectangles and

relationships may be qualified by alphanumeric relationships may be qualified by alphanumeric codes, like 1, P and Z.codes, like 1, P and Z.

““1” means that a child must exist in only one row or an 1” means that a child must exist in only one row or an nn means that a child must exist in means that a child must exist in nn and only and only nn rows. rows.

““P” represents a positive number and means a child P” represents a positive number and means a child must have one-parent-to-many-children relationship.must have one-parent-to-many-children relationship.

““Z” represents a zero and means a child may have Z” represents a zero and means a child may have zero-to-one rows related to a parent, which means a zero-to-one rows related to a parent, which means a parent may or may not have a child or children.parent may or may not have a child or children.

Page 32: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 3232

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

IDEF1X (continue)IDEF1X (continue) IDEF1X uses a dashed line to represent IDEF1X uses a dashed line to represent

non-identifying relations.non-identifying relations. IDEF1X uses a solid line to represent an IDEF1X uses a solid line to represent an

identifying relations.identifying relations. IDEF1X model does support categories or IDEF1X model does support categories or

subtypes and labels them as categories.subtypes and labels them as categories. Categories inherit from their parent.Categories inherit from their parent.

Page 33: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 3333

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7

Unified Modeling Language Unified Modeling Language (UML)(UML) Entities are drawn as rectangular class Entities are drawn as rectangular class

diagrams with three internal rectangles diagrams with three internal rectangles whether they contain methods or not.whether they contain methods or not.

The top-most rectangle contains the name of The top-most rectangle contains the name of the object of interest or entity, the middle the object of interest or entity, the middle rectangle contains the list of attributes that rectangle contains the list of attributes that describe the entity and the attributes’ data describe the entity and the attributes’ data types.types.

Page 34: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 3434

Define 5 modeling Define 5 modeling techniquestechniques

Section 7Section 7 UML (continue)UML (continue) All relationships are shown by lines, with All relationships are shown by lines, with

minimum and maximum cardinality next to the minimum and maximum cardinality next to the entities. Exceptions to the rule of depicting entities. Exceptions to the rule of depicting cardinality are inheritance and aggregation cardinality are inheritance and aggregation relationships because there is always a “has-a” relationships because there is always a “has-a” relationship in aggregation or composition and relationship in aggregation or composition and “is-a” relationship in inheritance.“is-a” relationship in inheritance.

The “has-a” relationship descends from the The “has-a” relationship descends from the parent to the child and there is only one parent.parent to the child and there is only one parent.

The “is_a” relationship is treated in the context The “is_a” relationship is treated in the context of a single inheritance model, like the Java of a single inheritance model, like the Java programming language.programming language.

UML does support categories or subtypes and UML does support categories or subtypes and labels them as subclasses, which means the labels them as subclasses, which means the modeling technique for categories is modeling technique for categories is inheritance.inheritance.

Page 35: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 3535

Define 5 modeling Define 5 modeling techniquestechniques

Review Section 7Review Section 7

Original E-ROriginal E-R Extended E-RExtended E-R Information Engineering (IE)Information Engineering (IE) IDEF1XIDEF1X Unified Modeling Language (UML)Unified Modeling Language (UML)

Page 36: 1 Domain Models A line manager asks, “These consultants and their models. I thought they were toys at first and then one of the consultants told me that

Copyright @2006, Michael McLaughlinCopyright @2006, Michael McLaughlin 3636

SummarySummary

Define modelingDefine modeling Build table modelsBuild table models Define binary and n-ary relationsDefine binary and n-ary relations Types of binary relationsTypes of binary relations Build model of tablesBuild model of tables Define history of modelingDefine history of modeling Define 5 modeling techniquesDefine 5 modeling techniques


Recommended