0% found this document useful (0 votes)
21 views37 pages

TA80 CONF020 DataModelIntro

Uploaded by

sunnyvara.1998
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)
21 views37 pages

TA80 CONF020 DataModelIntro

Uploaded by

sunnyvara.1998
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

Introduction to the Data Model

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 ViewNormal or ViewNotes 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

• The Data Dictionary

• Objects and 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

• All subtypes stored in one table


• Table named after parent
- Subtype column is a foreign key to a second
table that stores subtype codes and names
- Columns irrelevant to given subtype have null
values
© Guidewire Software, Inc. 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 ABContact
- Foreign key ID
- Array key Name
- Type key CreateTime
PrefersContactByEmail
entity
Score
fields
AssignedUser
AllAddresses
VendorType

© 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:

- A String value ABContact


ID
- A datetime value Name
CreateTime
PrefersContactByEmail
- A boolean value Score
AssignedUser
- An integer value AllAddresses
VendorType

© 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)

FullName = FirstName + MiddleName + LastName


© Guidewire Software, Inc. 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

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

• These tasks are discussed in following lessons

© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
17
Lesson outline
• Contents of the data model

• The Data Dictionary

• Objects and 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

• 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. 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

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

type keys have link to


typelist

© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
23
Arrays

• Each array includes link to entity stored within array

© 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

• 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. All rights reserved. Do not distribute without permission.
27
Generating 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. All rights reserved. Do not distribute without permission.
28
Lesson outline
• Contents of the data model

• The Data Dictionary

• Objects and 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

...

UI form with data


read display
row in ab_abcontact from db anAB in UI
db Coverage Contact
table update modify
to db instance of
in UI
Gosu class
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
30
Dot notation
• Dot notation is a coding
technique used to identify data
elements such as text fields,
related objects or collections of
objects.
- Used in UI configuration and
Gosu
- Not used in data model
configuration, but useful to
discuss here because it relies
on relationships in data model [Link]
• Starts with object
• Ends with field, related object,
or related array
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
31
Dot notation syntax
• Referencing data field on given object
- [Link]

anABContact
FaxPhone

[Link]

• Referencing field on related object


- [Link]

anABContact (User object)


AssignedUser JobTitle

[Link]
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
32
Dot notation syntax
• Referencing array on given object
- [Link]

anABContact (array of BankAccount objects)


BankAccounts

[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

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 [Link])
c) A virtual data field (such as [Link])
d) A foreign key field (such as [Link])
e) An array key field (such as [Link])
f) A typelist (such as VendorType)
g) A type key field (such as [Link])
2. Name two circumstances in which you would execute the
regen-dictionary command.
(continued)
© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
35
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. 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 products are protected by one or more United States patents.

© Guidewire Software, Inc. All rights reserved. Do not distribute without permission.
37

You might also like