Data Model

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 58

Clarity Data Model

Module 1

Copyright ©2006 CA. All rights reserved. All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Module Objectives
After this module, you will be able to:
 Identify the Clarity Data Model
 Join Tables

2 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Identify the Clarity Data Model

Task 1

Copyright ©2006 CA. All rights reserved. All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Data Model Overview
 Over 3000 database objects
 Over 600 tables
 Data Model consists of standard and non-standard
schemas

4 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Data Model Reference
 Best source for data model information is the
Clarity Technical Reference Guide, which contains:
-Entity Relationship Diagrams (ERD)
-Table Descriptions
-Field Descriptions
-Information broken down by Modules

Clarity Technical Reference Guide


http://support.niku.com > Product Documentation

5 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Security ERD

6 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Standard Schema
Naming Convention - Database objects have the
following naming rules

<component>_<sub_component>_<additional desc>_<type_id>
where:
- helps identify the module or the component within the
<component> Clarity application

<sub_component> - further describes the component

<additional desc> -further describes the <sub_component>

<type_id> -describes the database object

(i.e. cmn_sec_groups_u1 – common security group unique


index 1)

7 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Standard Schema
This table lists most of the Components used in Clarity

Component Identifier
Business Development BIZ

Business Process Management BPM

Calendaring CAL

Capacity Planning CAP

Collaboration CLB

Common CMN

Methodology MR

Data Mart NBI

Discussions NTD

eXtensible Data Model XDM

Object Definition Fields ODF

Portfolio Management PMA

Project Accounting PAC

Project/Portfolio Management PRJ

Resource Management RSM

Shared SRM Objects (Master tables) SRM

8 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Standard Schema
This table lists most of the Type IDs used in Clarity

Type Type ID Identifier


Primary Key Constraints These need to be named explicitly as they control the name of the
PK
and Indexes primary key index (which is automatically created)

These need to be named explicitly (“alter table XYZ add XYZ_FK1


Foreign Key Constraints FKx
foreign key

Check Constraints CKx i.e. CK1 or CK2

Unique Indexes Ux i.e. U1

Non-Unique Indexes Nx i.e. N1 or N2

i.e. S1 or S2. S1 is used for Primary Key sequences only, i.e.


Sequences (Oracle only) Sx
CMN_LOOKUPS_S1

Triggers TRGx or Tx i.e. TRG1 or TRG2, T1 or T2

Packages PKG Collection of Stored Procedures

Stored Procedures SP Routine to run a list of Commands

Functions FCT Routine that performs a calculation and returns the value

Views V Displays fields from one or more Tables through one Object

Aggregate/Summary
SUM Calculations
Tables

9 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Standard Schema
This table lists most of the Type IDs used in Clarity

Type Type ID Identifier


Primary Key Constraints These need to be named explicitly as they control the name of the
PK
and Indexes primary key index (which is automatically created)

These need to be named explicitly (“alter table XYZ add XYZ_FK1


Foreign Key Constraints FKx
foreign key

Check Constraints CKx i.e. CK1 or CK2

Unique Indexes Ux i.e. U1

Non-Unique Indexes Nx i.e. N1 or N2

i.e. S1 or S2. S1 is used for Primary Key sequences only, i.e.


Sequences (Oracle only) Sx
CMN_LOOKUPS_S1

Triggers TRGx or Tx i.e. TRG1 or TRG2, T1 or T2

Packages PKG Collection of Stored Procedures

Stored Procedures SP Routine to run a list of Commands

Functions FCT Routine that performs a calculation and returns the value

Views V Displays fields from one or more Tables through one Object

Aggregate/Summary
SUM Calculations
Tables

10 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Standard Schema
This table lists most of the Type IDs used in Clarity

Type Type ID Identifier


Primary Key Constraints These need to be named explicitly as they control the name of the
PK
and Indexes primary key index (which is automatically created)

These need to be named explicitly (“alter table XYZ add XYZ_FK1


Foreign Key Constraints FKx
foreign key

Check Constraints CKx i.e. CK1 or CK2

Unique Indexes Ux i.e. U1

Non-Unique Indexes Nx i.e. N1 or N2

i.e. S1 or S2. S1 is used for Primary Key sequences only, i.e.


Sequences (Oracle only) Sx
CMN_LOOKUPS_S1

Triggers TRGx or Tx i.e. TRG1 or TRG2, T1 or T2

Packages PKG Collection of Stored Procedures

Stored Procedures SP Routine to run a list of Commands

Functions FCT Routine that performs a calculation and returns the value

Views V Displays fields from one or more Tables through one Object

Aggregate/Summary
SUM Calculations
Tables

11 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Standard Schema
This table lists most of the Type IDs used in Clarity

Type Type ID Identifier


Primary Key Constraints These need to be named explicitly as they control the name of the
PK
and Indexes primary key index (which is automatically created)

These need to be named explicitly (“alter table XYZ add XYZ_FK1


Foreign Key Constraints FKx
foreign key

Check Constraints CKx i.e. CK1 or CK2

Unique Indexes Ux i.e. U1

Non-Unique Indexes Nx i.e. N1 or N2

i.e. S1 or S2. S1 is used for Primary Key sequences only, i.e.


Sequences (Oracle only) Sx
CMN_LOOKUPS_S1

Triggers TRGx or Tx i.e. TRG1 or TRG2, T1 or T2

Packages PKG Collection of Stored Procedures

Stored Procedures SP Routine to run a list of Commands

Functions FCT Routine that performs a calculation and returns the value

Views V Displays fields from one or more Tables through one Object

Aggregate/Summary
SUM Calculations
Tables

12 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Standard Schema
These columns exist in all tables in the standard schema

Data Type/Length
Column Name Description Constraint
Oracle SQL/Server
Primary Key – a
system-generated
ID NUMBER NOT NULL INT NOT NULL
unique identifier for
this row in this table.

Date/time record/row DATETIME NOT


CREATED_DATE DATE NOT NULL
was created NULL

User that created the


CREATED_BY record. Foreign key to NUMBER NOT NULL INT NOT NULL
CMN_SEC_USERS.ID

Date/time this
DATETIME NOT
LAST_UPDATED_DATE record/row was last DATE NOT NULL
NULL
updated

User that updated the


LAST_UPDATED_BY record. Foreign key to NUMBER NOT NULL INT NOT NULL
CMN_SEC_USERS.ID
13 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Non-Standard Schema
 In order to support the legacy software packages,
in Clarity, the Non-Standard Schemas from the
legacy packages were incorporated into Clarity
almost entirely “as is”, except for a few changes
where Tables were redundant and the functionality
could be included in the Standard Schema
 Non Standard Schema table, for example, have a
“prID” field as the Primary Key where many
Standard Schema Tables have “ID” as the Primary
Key

14 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Sequences
 Where possible, data is segregated by their IDs.
This allows us to determine whether a record is
part of a demo load, for instance. The sequence
limits are:
- Seed data: 000000 – 1999999
- Demo data: 2000000 – 4999999
- Customer data: 5000000 +

15 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Sequences example

Seed data

Customer data

16 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Lookups
 Many of the fields in Clarity are Browse and Pull-
down values
 The underlying data comes from Lookups
 Static Lookups are stored in 2 main tables
- CMN_LOOKUP_TYPES – original value
- CMN_LOOKUPS – associated values
 Dynamic lookups are based on queries and can
be created to dynamically update the listing or
choices

17 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Lookups
Core Lookup Tables

18 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Aquadata
 Aquadata is a query analyzer providing access to
the Data Model data tables and fields
 Aquadata allows users to build and run simple SQL
queries and then displays the fields in a table
format
 Users can preview the fields and data contained in
tables first, prior to building complex SQL or
Clarity NSQL statements
 Aquadata is not part of the Clarity package

19 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Resources
 When Users enter data in the Resource
Management module, data is written into tables:
- SRM_RESOURCES
- PRJ_RESOURCES
 Labor Resources are also written into the table:
- CMN_SEC_USERS
- After rows are inserted, the user record is
“locked” (can not login).

20 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Resources cont.
 Labor Resources (created from application
resources) are also written into the table:
- CMN_SEC_USERS
- After rows are inserted, the user record is
“locked” (can not login).

21 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Resources cont.
 Admin Tool Resources are also written into the
table:
- CMN_SEC_USERS
- After rows are inserted, the user record is
“active” and has “right access”

22 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Resources
Core Resource Tables

23 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Users
 Users are considered Resources with a Login Name
and Password and can have Access Groups or
Rights assigned to them
 Users are stored in a table called:
-CMN_SEC_USERS
 Any table with created_by or last_updated_by
fields will have to link to CMN_SEC_USERS to get
the Resource’s First Name and Last Name
 Users are created from the Resources link via the
Administration Tools page
-Clarity application automatically makes an entry
into the srm_resources table

24 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Users
Core User Tables

25 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Projects
 Customers use Clarity to manage and summarize
Project Information.
 INV_Projects is the master header table for
Project data.
 More detailed data about a Project is stored in:
- PRJ_PROJECTS: Project plan information
- PAC_MNT_PROJECTS: Information about the
Financials
- PRTEAM: What Resources are Staffed to which
Projects?
- PRTASK: What Tasks are on the Project?
- PRASSIGNMENT: Which Resources are
Assigned to the Project Tasks?

26 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Projects
Core Project Tables

27 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Projects

28 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Projects
SQL to display the name of SQL to display which tasks are
the assigned to which resources
project manager on which projects
select select
P.id niku_project_id, P.id niku_project_id,
P.name projectname, P.name projectname,
P.unique_name projectid, P.unique_name projectid,
PP.manager_id projectmanagerID, T.prname taskname,
U.last_name R.last_name resource_lastname,
projmgr_lastname, R.first_name resource_firstname
U.first_name from srm_projects P,
projmgr_firstname prtask T,
from srm_projects P, prassignment A,
prj_projects PP, srm_resources R
cmn_sec_users U where P.id = T.prprojectid
where P.id = PP.prid and T.prid = A.prtaskid
and PP.manager_id = U.id and R.id = A.prresourceid

29 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Object Defined Fields
 Clarity allows Users to create new Object Defined
Fields (custom fields) associated with Standard
Objects and Custom Objects
 This is done through the Objects link in Clarity Studio
 Object Defined Fields are stored in tables with a
prefix of “ODF_CA_”:
•Action Items: odf_ca_actionitem •Other Work: odf_ca_other
•Applications: odf_ca_application •Portfolio: odf_ca_portfolio
•Assets: odf_ca_asset •Product: odf_ca_product
•Assignment: odf_ca_assignment •Projects: odf_ca_project
•Baseline: odf_ca_baseline •Requisition: odf_ca_requisition
•Change Requests: odf_ca_change •Resources: odf_ca_resource
•Company: odf_ca_company •Risk: odf_ca_risk
•Idea: odf_ca_idea •Task: odf_ca_task
•Incident: odf_ca_incident •Team: odf_ca_team
•Issue: odf_ca_issue

30 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Object Defined Fields

 Object Defined Fields are stored in tables with a


prefix of “ODF_CA_”: (continued)
-When a new Custom Object is created, a
corresponding “odf_ca_” prefixed table also gets
created.
-Custom Master objects can be created. They
have a partition code but not a parent id.
-code: this Field contains the ID value entered
from the Clarity UI
-odf_parent_id: contains the link to the Business
Object Record
31 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Object Defined Fields
Object Defined Field Links Example,
Using the Project Object

32 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Time
 Customers use Clarity Time to capture Actuals
against Projects
 PRTIMEPERIOD: Table defines which day of the
week is the start of the week and end of the week.
 Also shows if a Time Period is Open or Closed for
entering time.
 prStart: Starting date.
 prFinish: Ending date.

33 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Time cont.
 Additional Data regarding prStart and prFinish
- Date is saved to include all minutes and
seconds for the day. The minutes and seconds
have a timestamp of 00:00 of the next day.
This represents the end of a given day and the
beginning of the following day.
- For example, when entering a finish date of
1/31/2006, it is saved in the field as 2/1/2006
00:00.
- Need to subtract 1 from the prFinish date to
show the actual given date.

34 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Time – Additional Tables
 PRTIMESHEET: Shows which week and which Resource
information is being captured
- prStatus: this field contains information on Status of the
Timesheet, i.e.,
 0 = Unsubmitted
 1 = Submitted
 2 = Rejected (Returned)
 3 = Approved
 4 = Posted
 5 = Adjusted
 PRTIMEENTRY: Captures time entered for a given Time
Period by Task
- prActCurve: BLOB field stores all the Actuals
- prActSum: Sum of all Time information stored in
seconds. Divide by 3600 to convert to hours

35 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Core Time Tables

36 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
PRTIMEENTRY example

37 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Time Slices
 Time information is stored in BLOB fields in Clarity
 Data stored in hours
 Main Time Slice tables are:
-PRJ_BLB_SLICEREQUESTS
 Contains the settings for each Time Slice type

-PRJ_BLB_TIMESLICES
 All cracked BLOB information is stored here
 slice_request_id: field identifies what type of Time Slice the
information is for.

38 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Core Time Slice Tables

39 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Data Model Review
 Clarity Technical Reference Guide
http://support.niku.com > Product
Documentation
 Standard Schema Naming Conventions
<component>_<sub_component>_<additional
desc>_<type_id>
 Clarity Data Model includes Standard Schema
and Non-Standard Schema “as is” legacy tables

40 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Interactive Demonstration

41 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Join Tables

Task 2

Copyright ©2006 CA. All rights reserved. All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Query Analyzer Reviews Tables
Using SQL queries
 Define Basic SQL example and statement
 Review table types and Table purpose
 Review NBI Tables
 Review Mapping fields to tables per SQL statement

43 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Joining Practices
 Use query analyzer to join tables and view results
 SQL statements are used to join tables

44 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
SQL Statements
 SELECT
 FROM
 WHERE
 GROUP BY

45 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Create a Simple SQL Statement
 Create a SQL which includes the Project ID,
Project Name, Unique Project Name for all projects
that are active

46 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Simple SQL Result

47 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Joining Exercises
 Find which tasks are assigned to which resources
for projects.
 Tables needed:
PRTASK
SRM_PROJECTS
PRASSIGNMENTS
SRM_RESOURCES

48 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Joining Tables

Last Name First Name Project Name PR Task


Name

Starkey Rebecca Call Center Effort


Improvements
Nurberg Mary Co-Funded CRM Prep cost
Enhancements And benefit
estimate
Sauer Jason HR Benefits Coding
Upgrade

49 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
SQL Joining Statement Result

50 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Joining Tables
Show all Projects ID’s, the Name of the Project and
the full name of all resources assigned to the
project.

51 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Resources assigned to projects

52 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Joining Exercises
 List all the managers with resources that report to
them. Include the managers first, last name and
the resources first and last name.

53 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Viewing NBI Tables
 Project ID
 Project Name
 Start date
 End date
 Open for Time Entry
 Project Manager Name
 Team member
 Tasks
 Accumulated EST, ACTUAL, etc. time

54 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Interactive Demonstration

55 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Skill Builder

56 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Module Summary
You should now be able to:
 Identify the Clarity Data Model
 Join Tables

57 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
58 © 2005 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.

You might also like