Getting Started with Data Model

Slides:



Advertisements
Similar presentations
Chapter 4 Joining Multiple Tables
Advertisements

Maximizing Queries Using Tables Advanced Data Model.
2010/11 : [1]Building Web Applications using MySQL and PHP (W1)MySQL Recap.
Clarity Educational Community Portlet Creation and Management Getting Started with NSQL Presented by: Juan Ortega, David Zywiec.
Instructor: Craig Duckett CASE, ORDER BY, GROUP BY, HAVING, Subqueries
Clarity Educational Community Demand Management Overview Presented by: Clayton Reynolds and Brian Lofton | Date Prepared: April.
Clarity Educational Community Clarity Educational Community Integration Interface Strategies and Methods.
Clarity Educational Community Advanced Maximizing Portlet Function to Personalize Output Presented by: Sangeet Chourey and Chris.
Clarity Educational Community Resource Management Overview Presenters: Jerry Dolak and Karl Lockwood.
Clarity Educational Community Clarity Educational Community Creating and Tuning SQL Queries that Engage Users.
Introduction to Access. What is Access? Database tool Creates a database Good data query (lookup and analysis) ability Good entry forms Good reports Multi-user.
LCT2506 Internet 2 Further SQL Stored Procedures.
Coding In SQL. Structure Query Language Common query language used in database management systems Common query language used in database management systems.
Structured Query Language Part I Chapter Three CIS 218.
Clarity Educational Community Financial Management Overview Presented by: David Wachsmann & Jen Scarlato Prepared: 4/10/2015.
Clarity Educational Community Clarity Educational Community Tools and Techniques for Financial Processing.
Clarity Educational Community Metrics that Matter Derek Phair & Eric Van Blarcum | May 4-6, 2015.
Clarity Educational Community Jaspersoft Navigation as an Ad Hoc User Presented by: Doug Greer | Prepared On: April 18, 2015.
Clarity Educational Community Portfolio Management Overview.
Interpreting SQL Code. SQL (The language used to query a database) S is used to specify the you want to include. F is used to specify the the selected.
CORE 2: Information systems and Databases STORAGE & RETRIEVAL 2 : SEARCHING, SELECTING & SORTING.
Computer Science 101 Web Access to Databases SQL – Extended Form.
Clarity Educational Community Get the Results You Need When You Need Them Transitioning to CA PPM On Demand Presented by: Joshua.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
Clarity Educational Community Enhanced Functionality and Integration Advanced GEL Scripts Presented by: James Gille | Date Prepared:
Clarity Educational Community Using CA PPM for Effective Program Management Presented by: Brian Wuenstel and Don Dickson | Date.
Ashwani Roy Understanding Graphical Execution Plans Level 200.
Chapter 9 Joining Data from Multiple Tables
Oracle Database Administration Lecture 2 SQL language.
Clarity Educational Community Configuration Releases Best Practices in the CA PPM Development Process Presented by: Brian Wuenstel.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Improving Database Performance Derrick Rapley
Ch Determine the output displayed from procedures Lab sheet 10.4.
SQL for Data Retrieval. Running Example IST2102 Data Preparation Login to SQL server using your account Select your database – Your database name is.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
Relational Databases.  In week 1 we looked at the concept of a key, the primary key is a column/attribute that uniquely identifies the rest of the data.
SQL 101 – Class 1 Lee Turner. Agenda 1. This is your life – SQL A brief history of SQL What SQL is and what it is not Normalization 2. Some Super Simple.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Database Basics BCIS 3680 Enterprise Programming.
+ Complex SQL Week 9. + Today’s Objectives TOP GROUP BY JOIN Inner vs. Outer Right vs. Left.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
INFANL01-3 ANALYSE 3 WEEK 3 March 2015 Institute voor Communication, Media en Informatietechnology.
In this session, you will learn to: Query data by using joins Query data by using subqueries Objectives.
Database Relationships Objective 5.01 Understand database tables used in business.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 5: SQL I Rob Gleasure robgleasure.com.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
Creating and Tuning SQL Queries that Engage Users Writing Efficient SQL.
MySQL Tutorial. Databases A database is a container that groups together a series of tables within a single structure Each database can contain 1 or more.
Lecture 9 Using Structured Query Language (SQL) Jeffery S. Horsburgh Hydroinformatics Fall 2012 This work was funded by National Science Foundation Grant.
Step 1 Lead Notifications Dear Partner, New leads have been assigned to your organization based on customer preference and are available for you.
Database Presentation BIM, Mrs. Bailey. **Database Notes** Use new sheet of paper! Microsoft Access - known as a database management system or DBMS Database.
Jeremy Kingry, eBECS | ADVANCED SQL SERVER FOR ADMINS AND ANALYSTS.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
1 ORACLE I 3 – SQL 1 Salim Phone: YM: talim_bansal.
DAY 20: ACCESS CHAPTERS 5, 6, 7 Larry Reaves October 28,
Chapter 12 Introducing Databases. Objectives What a database is and which databases are typically used with ASP.NET pages What SQL is, how it looks, and.
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha
Prof: Dr. Shu-Ching Chen TA: Yimin Yang
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha
PHP and MySQL.
Chapter 4 Summary Query.
Prof: Dr. Shu-Ching Chen TA: Haiman Tian
Access: SQL Participation Project
SQL Fundamentals in Three Hours
Use of SQL – The Patricia database
Presentation transcript:

Getting Started with Data Model Reporting Tables, Writing Queries, and More Presented by: Juan Ortega, David Zywiec | Date Prepared: May 4, 2015

Agenda SQL Basics Clarity Core Tables Investments (Projects, Ideas) Resources / Users Lookups Time Reporting Time Slices

Requirements SQL Developer Clarity DB Connection Info and Access SQL Developer: Here Clarity DB Connection Info and Access Place holder for information

SQL Basics SELECT Statements JOIN Statements WHERE Clause GROUP BY ORDER BY Best practices: Try to use ANSI SQL syntax

SQL Basics, cont. The SELECT statement retrieves column data from tables NSQL Queries must start with SELECT however for each column The FROM clause is a standard SQL statement that defines which table to gather data from The WHERE statement filters data returned by a query The GROUP BY clause is typically used to combine database records with identical values in a specified field into a single record, usually for the purposes of calculating some sort of aggregate function The ORDER BY clause is used to sort data on a column The sort can be ascending or descending Use the acronym ASC or DESC

JOIN Types INNER JOIN LEFT JOIN Return rows when there is at least one match in both tables LEFT JOIN Return all rows from the left table, even if there are no matches in the right table.

Core Tables Investments Resources Timesheet INV_Investments is the basic investment table that links to all of the related investment tables Resources SRM_Resources is the basic resource/role table that links to all resource related tables Timesheet Stores timesheet information and links to the resource, time entry, and time period tables Investments INV_INVESTMENTS Timesheet PRTimeSheet Resource SRM_Resources Core Tables

Activity #1 Retrieve all Projects from the INV_INVESTMENTS table with Type = Project and Project is Active Retrieve Project ID, Project Name, and Project Manager Full Name (Last Name, First Name)

Queries – Activity #1 SELECT * FROM INV_INVESTMENTS inv WHERE inv.ODF_OBJECTTYPE = ‘project’ AND inv.is_active = 1 SELECT inv.code, inv.name, r.full_name FROM INV_INVESTMENTS inv INNER JOIN SRM_RESOURCES r on r.user_id = inv.manager_id

Queries – Activity #1 Preferred Way Non-Preferred Way SELECT inv.code, inv.name, r.full_name FROM INV_INVESTMENTS inv INNER JOIN SRM_RESOURCES r on r.user_id = inv.manager_id Non-Preferred Way FROM INV_INVESTMENTS inv , SRM_RESOURCES r WHERE r.user_id = inv.manager_id

Resources vs. Users Resources vs. Users (Application side vs. Administration Side) Resources are records on the Application side. Can be named resources or roles TABLE: SRM_RESOURCES USERS that have the ability to log into CA PPM TABLE: CMN_SEC_USERS

Resources vs. Users, cont. SRM_RESOURCE table has a JOIN with CMN_SEC_USERS SELECT r.full_name, u.last_name, u.first_name FROM SRM_RESOURCES r INNER JOIN CMN_SEC_USERS u on u.id = r.user_id Shortcut: Always use SRM_RESOURCES if possible to avoid querying the CMN_SEC_USERS table Exceptions: Security, User_name

Activity #2 Retrieve all USERS where their status is locked Retrieve all RESOURCES where Open for Time Entry is True

Queries – Activity #2 SELECT * FROM CMN_SEC_USERS u WHERE u.user_status_id = 202 -- 202 = locked, 201 = inactive, 200 = active FROM SRM_RESOURCES r WHERE r.person_type = 300 -- 300 = Employee, 301 = Contractor

Custom Fields on Core Tables All Custom tables begin with ODF_CA_ Each Core table has a unique Custom Table that contains the custom fields created on the Object Projects: ODF_CA_PROJECT Investments: ODF_CA_INV Resources: ODF_CA_RESOURCE Task: ODF_CA_TASK

Custom Objects All Custom Objects have a unique table All custom object tables begin with ODF_CA_ (object_id) The table for this Custom Object is ODF_CA_REGO_ACCESS_LOGS

Custom Objects, cont. Custom Objects can be either a Master Object or Subobject Subobjects will always have a Parent Examples of Subobjects are Status Report

Custom Objects, cont. Subobjects are linked to their Parent with the column ODF_PARENT_ID Example: SELECT ODF_PARENT_ID FROM ODF_CA_COP_PRJ_STATUSRPT

Activity #3 – Custom Object Create one Custom Object (Master) Populate Custom Object with 3 records Retrieve all records using SQL Retrieve all Status Reports for a Project and include Project ID Project Name Status Report Name Report Status

Queries – Activity #3 SELECT * FROM ODF_CA_OBJECT_ID SELECT inv.code, inv.name, rpt.name, rpt.cop_report_status FROM INV_INVESTMENTS inv INNER JOIN ODF_CA_COP_PRJ_STATUSRPT rpt on rpt.odf_parent_id = inv.id WHERE inv.code = ‘PRJ5555’

Lookups 2 Type of Lookups: Static & Dynamic Dynamic Lookups are SQL based; use your SQL skills to create a dynamic Lookup Static Lookups are values that you set To retrieve these values in a Query, use the following VIEW provided by CA PPM CMN_LOOKUPS_V

Activity #4 – Lookups Retrieve value of Idea Type for a Project SELECT OBJ_REQUEST_TYPE FROM INV_INVESTMENTS WHERE CODE = ‘XXXXX’ Result: type200

Group Activity #4 – Lookups Retrieve the display value of Idea Type for a Project SELECT v.NAME FROM INV_INVESTMENTS inv INNER JOIN CMN_LOOKUPS_V v on v.LOOKUP_TYPE = ‘OBJ_IDEA_PROJECT_TYPE’ and v.LOOKUKP_CODE = inv. OBJ_REQUEST_TYPE and v.LANGUAGE_CODE = ‘en’ WHERE inv.CODE = ‘XXXXX’ Result: Maintenance

Timesheet Tables Three main timesheet tables PRTIMESHEET PRTIMEENTRY PRTIMEPERIOD

Group Activity #4 – Timesheets Retrieve all Timesheets where status = Open (Not Submitted yet) SELECT * PRTIMESHEET WHERE PRSTATUS = 0 0 = Open 1 = SUBMITTED 2 = RETURNED 3 = APPROVED 4 = POSTED 5 = ADJUSTED

Time Slice Tables Time and Hour metrics are stored as blobs and are unreadable in the day to day production tables Time Slice tables open a window to this data for viewing These views allow CA PPM to group data into Weeks, Months, Quarters, etc. This grouping allows for more efficient queries Need to tell it what slice you are going after Time Slice Management prj_blb_slicerequests Time Slice Management Detail prj_blb_slices Time Slice Tables

Questions Phone Email Website We hope that you found this session informative and worthwhile. Our primary goal was to increase your understanding of the topic and CA PPM in general. There were many concepts covered during the session, if you would like to contact any presenter with questions, please reach out to us. Thank you for attending regoUniversity 2015! Phone 888.813.0444 Email info@regouniversity.com Website www.regouniversity.com