TA80 CONF020 DataModelIntro
TA80 CONF020 DataModelIntro
5 Sept 2013
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, choose ViewNormal or ViewNotes Page.
If you choose to print the notes for the lesson, be sure to select “Print hidden slides.”
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
2
Lesson outline
• Contents of the data model
© Guidewire Software, Inc. 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
• Every Guidewire data model includes:
- Entities
- Entity fields
- Typelists
© Guidewire Software, Inc. 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, User
ABContact User
ID ID
Name Department
CreateTime JobTitle
PrefersContactByEmail VacationStatus
Score …
AssignedUser
AllAddresses
VendorType
…
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
5
Data model entities in the database
• In general, each entity is stored in its own database table
Exception to this include virtual
ABContact
entities and subtyped entities
ID
Name
CreateTime
PrefersContactByEmail
Score
AssignedUser
AllAddresses
VendorType
…
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
6
Subtyped entities
ABContact
• Some entities are
subtyped
- Each subtype inherits all
fields of its parent ABPerson
• Most Guidewire entities
that are subtyped are ABAdjud- ABPerson ABPolicy
also abstract icator Vendor Person
- You cannot create
instance of entity at top
level
AB AB
Attorney Doctor
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
7
Subtypes in the database
© Guidewire Software, Inc. 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, such as:
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
10
Data fields in the database
• Data fields can be physical or virtual
- Physical fields are defined in data model and stored as
columns in given database table
- Virtual fields are defined in code and are not stored in the
database
ABContact
...
FirstName
MiddleName
LastName
FullName (virtual)
…
ABContact User
ID ID
Name Department
CreateTime JobTitle
PrefersContactByEmail VacationStatus
Score …
AssignedUser
AllAddresses
VendorType
…
© Guidewire Software, Inc. 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
...
AssignedUser
…
© Guidewire Software, Inc. 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
- Array keys are not stored in database
ABContact Address
ID ID
Name AddressLine1
CreateTime AddressLine2
PrefersContactByEmail City
Score State
AssignedUser …
AllAddresses
VendorType
…
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
14
Type key fields and typelists
• A typelist is a predefined list of values that constrains a
field
• A type key field is a field associated with a specific typelist
- Values in that field limited to those defined in typelist
typelist
ABContact
VendorType
ID
Auto Repair Shop
Name
Auto Glass Shop
CreateTime
Towing Service
PrefersContactByEmail
Fire Inspector
Score
Home Inspector
AssignedUser
Doctor
AllAddresses
Nurse
VendorType
…
… type key field
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
15
Typelists in the database
• Each typelist is stored in its own table
• Each type key is foreign key to typelist table
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
16
Data model configuration
• Data model configuration consists of:
- Adding new fields to base application entities
- Creating new entities
- Creating and modifying typelists
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
17
Lesson outline
• Contents of the data model
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
18
The Data Dictionary
• The Data Dictionary is a collection of HTML pages that
documents the entities and typelists in your application
- After you modify data model, you can regenerate
data dictionary
Two
primary
sections
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
19
Entities in the Data Dictionary
• Entities section lists each entity and information about it
- To view information about given entity, click its name
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
20
Entity header
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
21
Subtypes list
• If entity is subtyped, it has
subtypes list
- Identifies all child
subtypes
- Includes links to each
subtype
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
22
Fields
name data type properties description
expandable list of UI
files that display field
(if field is used in UI)
extensions to entity
in dark blue
virtual properties
identified
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
23
Arrays
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
24
Subtype fields
• If entity is subtyped, fields and arrays declared at each
subtype level are listed in their own section
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
25
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. All rights reserved. Do not distribute without permission.
26
All fields
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
28
Lesson outline
• Contents of the data model
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
29
Data model entities in application architecture
database application server user interface
page configuration file
data model entity internal Gosu class
ABContact ABContact
Fields
Name
Name
PublicID
PublicID
CreateTime
CreateTime
…
...
anABContact
FaxPhone
[Link]
[Link]
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
32
Dot notation syntax
• Referencing array on given object
- [Link]
[Link]
• Referencing field at subtype level
- (object as subtype).field
anABContact
ABPerson
DateOfBirth
(anABContact as ABPerson).DateOfBirth
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
33
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. All rights reserved. Do not distribute without permission.
34
Review questions
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
36
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
DataHub, Guidewire InfoCenter, Guidewire Standard Reporting, 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 Software, Inc. All rights reserved. Do not distribute without permission.
37