0% found this document useful (0 votes)
66 views38 pages

02-TA80 CONF020 DataModelIntro

The document discusses the contents and structure of Guidewire's data model, including entities, entity fields, subtyping, and how entity data is stored in databases. It provides examples of different types of entities and fields and how they relate to each other.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views38 pages

02-TA80 CONF020 DataModelIntro

The document discusses the contents and structure of Guidewire's data model, including entities, entity fields, subtyping, and how entity data is stored in databases. It provides examples of different types of entities and fields and how they relate to each other.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Introduction to the Data Model

December 9, 2013

© Guidewire Software, Inc. 2001-2013. All rights reserved.


Do not distribute without permission.
Lesson objectives
• By the end of this lesson, you should be able to:
- Describe the contents of a Guidewire data model
- Identify information about a given application's data model
- Reference entity fields using dot notation

This lesson uses the notes section for additional explanation and information.
To view the notes in PowerPoint, select View  Normal or View  Notes Page.
When printing notes, select Note Pages and Print hidden slides.
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 2
Lesson outline

• Contents of the data model

• The Data Dictionary

• Objects and the data model

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 3
The data model
• For each Guidewire application, the data model is the set
of data objects and information about their relationships
ABContact
ID • Consists of entities,
AssignedUser
WebAddress_Ext
FraudInvestigationNum_Ext
entity fields, typelists
LastCourtesyContact_Ext
CustomerRating_Ext
and typekeys
StrategicPartner_Ext
ContactTier_Ext (typekey) - Part of Guidewire
ContactITier
Interactions_Ext (array)
ID data model
- Other data model
components include
Interaction_Ext User
ID ID
field validators and
* InteractionDate abstract data types
InitiatedByContact
Summary InteractionReason_Ext - Diagram shows work
ABContact (foreignkey)
AssociatedUser (foreignkey) ID completed by
Reason (typekey)
Channel (typekey) students in course
ChannelType_Ext
ID

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 4
Data model entities
• A data model entity is an abstract definition of a group of
business objects used by the application
• Examples: ABContact and User

ABContact User
ID ID
Name Department
CreateTime JobTitle
PrefersContactByEmail VacationStatus
Score ...
AssignedUser
ContactNotes
VendorType
...
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 5
Data model entities in the database

ABContact
ID
Name
CreateTime
PrefersContactByEmail
Score
AssignedUser
ContactNotes
• Most entity data is stored in its own VendorType
database table ...
- Some tables are shared
- Other entities are virtual, non-persistent entities and no data is
managed in the database
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 6
Subtyped entities
• Subtype inherits all fields of its parent
- Some entities are subtyped ABContact
- Most subtyped are also abstract

• Not possible to
create entity instance at the
supertype, top level
ABPerson ABCompany

ABPersonVendor ABPolicyPerson ABAdjudicator

ABAttorney ABDoctor

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 7
Subtype entity data
• Supertype parent table stores all instances of itself AND of
subtype data
- Contains parent fields and all subtype fields
- Irrelevant fields are null for specific subtypes
- Subtype column identifies subtype

• Example:
- Firstname and lastname are always null for subtype = 3

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 8
Entity fields
• An entity field is a value (or set of values) used to define
the state or nature of a specific instance of the entity
- Example: ABContact's Name field

• Four general types of entity fields


- Data
- Foreign key
- Array key
ABContact
- Typekey
ID
Name
CreateTime
entity PrefersContactByEmail
Score
fields
AssignedUser
ContactNotes
VendorType
...
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 9
Data fields
• A data field stores a single value that does not reference
any other object or table
• Examples of single values:
- Name is a String
- CreateTime is a datetime
- PrefersContactByEmail is a bit
- Score is an integer
ABContact
ID
Name
CreateTime
entity PrefersContactByEmail
Score
fields
AssignedUser
ContactNotes
VendorType
...
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 10
Data fields in the database
• Data fields can be physical or virtual
- Data model defines physical fields as columns in a database table
- Code defines virtual fields and there is no physical database column

ABPerson
...
FirstName
MiddleName
LastName
FullName (virtual)
...

FullName = FirstName + " " + MiddleName + " " +


LastName

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 11
Foreign key fields
• A foreign key field stores a reference to a related object in
the data model
• AssignedUser in ABContact is the foreign key field for User

ABContact User
ID ID
Name Department
CreateTime JobTitle
PrefersContactByEmail VacationStatus
Score ...
AssignedUser
ContactNotes
VendorType
...
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 12
Foreign key fields in the database
• Foreign key fields are stored as foreign key columns

ABContact User
... ID
AssignedUser ...
...

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 13
Array key fields
• An array key field stores references to a set of related
objects in the data model
• Not stored in database
• Populated at runtime by queries

ABContact
ContactNote
ID
... ID
ContactNotes * ...
... ABContact
...

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 14
Typekey fields and typelists
• A typelist is a predefined list of values that constrains a
field
• A typekey field is a field associated with a specific typelist
• The typelist defines the possible values of the typekey field

ABContact
VendorType
ID Auto Repair Shop
Name Auto Glass Shop
CreateTime Towing Service
PrefersContactByEmail Fire Inspector
Score Building Contractor
AssignedUser Doctor
ContactNotes … typelist
VendorType
... typekey field

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 15
Typelists in the database
• Each typelist is stored in its own table
• Each typekey is a foreign key a single row in a typelist table

ABContact

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 16
Subtype typelists
• Subtyped entity automatically creates
typelist table of all subtypes
- Table of all subtypes for the supertype parent
- ID integer value uniquely identifies the subtype
- Typecode describes subtype

• Subtype column in the supertype table points to the


unique ID row in the typelist table

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 17
Data model configuration tasks
• Creating new entities
• Extending existing entities
• Creating typelists
• Extending existing typelists
• Following lessons discuss data model configuration tasks

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 18
Lesson outline

• Contents of the data model

• The Data Dictionary

• Objects and the data model

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 19
The Data Dictionary
• The Data Dictionary
documents the
entities and typelists
in your application
- Collection of HTML
pages
- Requires that you
regenerate
data dictionary
• Two primary
sections:
- Data Entities
- Typelists

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 20
Entities in the Data Dictionary
• Entities section lists each entity and information about it
• To view information about given entity, click its name
• Hyperlink document is fully navigable

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 21
Entity header

• Entity name and name of database table


• Delegate entities (if any)
- Delegates define fields and behaviors needed by multiple entities,
such as "Assignable" or "ABLinkable (to other apps)"
• Entity attributes (for definition of each, click " ")
• Other entities with foreign key and array references to this
entity

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 22
Subtypes list
• If entity is subtyped, it has
subtypes list
• Identifies all child subtypes
• Includes links to each
subtype

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 23
Fields
name data type properties description

foreign keys have link


to related entity

expandable list of UI
files that display field
(if field is used in UI)

extensions to entity
in dark blue

virtual properties
identified

typekeys have link to


typelist

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 24
Arrays
• Each array
includes a link to
an entity stored
within an array
• Data dictionary
shows the
linkage

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 25
Subtype fields
• If entity is subtyped, fields and arrays declared at each
subtype level are listed in their own section

ABContact

ABPerson

ABPersonVendor ABAdjudicator

ABAttorney

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 26
Typelists in the Data Dictionary
• Typelists section lists each typelist and its typecodes
- To view information about given typelist, click its name

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 27
All fields

• Alphabetic list of every field


- For each field, entity or entities with
that field are listed
- Useful when looking for a field and you
don't know on which entity it is declared
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 28
Generating the data dictionary

• You can (re)generate Data Dictionary:


- After initial install (Data Dictionary is not pre-generated)
- Any time you extend data model

• To regenerate dictionary, from bin directory, execute:


- gwXX regen-dictionary
- where XX is application's two-letter code

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 29
Lesson outline

• Contents of the data model

• The Data Dictionary

• Objects and the data model

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 30
Data model entities in application
architecture
database application server user interface
data model entity internal Gosu class page configuration file

ABContact ABContact
ABContact
ID Fields
Name Name
CreateTime PublicID
... CreateTime
...

UI form with data

ab_abcontact anAB
table row
Database

Coverage Contact
instance of
Gosu class
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 31
Dot notation
• Dot notation is a Gosu language syntax used to identify
data objects and properties
• Starts with object and ends
with field, related object,
or related array
• Relies on data model
- Not used to configure
data model
- Available for User Interface
configuration and Gosu classes
• Examples include data fields,
object collections, and methods
anABContact.FaxPhone

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 32
Dot notation syntax
• Referencing data field on given object
- object.field

anABContact

FaxPhone

anABContact.FaxPhone

• Referencing field on related object


- object.foreignKey.field

anABContact (User object)

AssignedUser JobTitle

anABContact.AssignedUser.JobTitle
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 33
Dot notation syntax (2)
• Referencing array on given object
- object.array

anABContact (array of BankAccount objects)

BankAccounts

anABContact.BankAccounts
• Referencing field at subtype level
- (object as subtype).field

anABContact
ABPerson
DateOfBirth

(anABContact as ABPerson).DateOfBirth
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 34
Lesson objectives review
• You should now be able to:
- Describe the contents of a Guidewire data model
- Identify information about a given application's data model
- Reference entity fields using dot notation

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 35
Review questions
1. For each of the following, identify if it is stored as a
database table, as a table column, or not stored in the
database at all:
a) An entity (such as ABContact)
b) A physical data field (such as ABContact.CreateTime)
c) A virtual data field (such as ABContact.FullName)
d) A foreign key field (such as ABContact.AssignedUser)
e) An array key field (such as ABContact.ContactNotes)
f) A typelist (such as VendorType)
g) A typekey field (such as ABContact.VendorType)

2. Name two circumstances in which you would execute the


regen-dictionary command.

(continued)
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 36
Review questions
3. For the object "myContact" of
type ABContact, what is the
dot notation for the object's:
a) Preferred currency?
b) Notes?
c) Level of experience of
myContact's assigned user?
d) Mobile phone (if it is a person)

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 37
Notices
Copyright © 2001-2013 Guidewire Software, Inc. All rights reserved.

Guidewire, Guidewire Software, Guidewire ClaimCenter, Guidewire PolicyCenter,


Guidewire BillingCenter, Guidewire Reinsurance Management, Guidewire
ContactManager, Guidewire Vendor Data Management, Guidewire Client Data
Management, Guidewire Rating Management, Guidewire InsuranceSuite, Guidewire
ContactCenter, Guidewire Studio, Guidewire Product Designer, Guidewire Live, Guidewire
ExampleCenter, Gosu, Deliver Insurance Your Way, and the Guidewire logo are
trademarks, service marks, or registered trademarks of Guidewire Software, Inc. in the
United States and/or other countries. Guidewire products are protected by one or more
United States patents.

This material is Guidewire proprietary and confidential. The contents of this material,
including product architecture details and APIs, are considered confidential and are fully
protected by customer licensing confidentiality agreements and signed Non-Disclosure
Agreements (NDAs).

This file and the contents herein are the property of Guidewire Software, Inc. Use of this
course material is restricted to students officially registered in this specific Guidewire-
instructed course, or for other use expressly authorized by Guidewire. Replication or
distribution of this course material in electronic, paper, or other format is prohibited without
express permission from Guidewire.
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 38

You might also like