Epicor 9 Database Concepts Course
Epicor 9 Database Concepts Course
9.05.601
Disclaimer
This document is for informational purposes only and is subject to change without notice. This document and its contents, including the viewpoints, dates and functional content expressed herein are believed to be accurate as of its date of publication. However, Epicor Software Corporation makes no guarantee, representations or warranties with regard to the enclosed information and specifically disclaims any applicable implied warranties, such as fitness for a particular purpose, merchantability, satisfactory quality or reasonable skill and care. As each user of Epicor software is likely to be unique in their requirements in the use of such software and their business processes, users of this document are always advised to discuss the content of this document with their Epicor account manager. All information contained herein is subject to change without notice and changes to this document since printing and other important information about the software product are made or published in release notes, and you are urged to obtain the current release notes for the software product. We welcome user comments and reserve the right to revise this publication and/or make improvements or changes to the products or programs described in this publication at any time, without notice. The usage of any Epicor software shall be pursuant to an Epicor end user license agreement and the performance of any consulting services by Epicor personnel shall be pursuant to Epicor's standard services terms and conditions. Usage of the solution(s) described in this document with other Epicor software or third party products may require the purchase of licenses for such other products. Where any software is expressed to be compliant with local laws or requirements in this document, such compliance is not a warranty and is based solely on Epicor's current understanding of such laws and requirements. All laws and requirements are subject to varying interpretations as well as to change and accordingly Epicor cannot guarantee that the software will be compliant and up to date with such changes. All statements of platform and product compatibility in this document shall be considered individually in relation to the products referred to in the relevant statement, i.e., where any Epicor software is stated to be compatible with one product and also stated to be compatible with another product, it should not be interpreted that such Epicor software is compatible with both of the products running at the same time on the same platform or environment. Additionally platform or product compatibility may require the application of Epicor or third-party updates, patches and/or service packs and Epicor has no responsibility for compatibility issues which may be caused by updates, patches and/or service packs released by third parties after the date of publication of this document. Epicor is a registered trademark and/or trademark of Epicor Software Corporation in the United States, certain other countries and/or the EU. All other trademarks mentioned are the property of their respective owners. Copyright Epicor Software Corporation 2010. All rights reserved. No part of this publication may be reproduced in any form without the prior written consent of Epicor Software Corporation.
TOC | 3
Contents
Database Concepts Course.....................................................................................................4 Before You Begin....................................................................................................................5
Audience.........................................................................................................................................................5 Prerequisites....................................................................................................................................................5 Environment Setup..........................................................................................................................................5
Table Linking.........................................................................................................................16
Dataset Relationships Tracker.........................................................................................................................17 Additional Information............................................................................................................................17 Workshop - Display the Dataset Relationships Tracker.............................................................................18 Join Types......................................................................................................................................................18
Conclusion.............................................................................................................................20
Epicor 9 | 9.05.601
Epicor Software
Audience
Specific audiences will benefit from this course. IT/Technical Staff System Administrators
Prerequisites
In order to complete the workshops in this course, all necessary modules must be licensed and operating in your training environment. For more information on the modules available, contact your Epicor Customer Account Manager [email protected]. It is also important that you understand the prerequisite knowledge contained in other valuable courses. Navigation Course - This course introduces navigational aspects of the Epicor application's user interface. Designed for a hands-on environment, general navigation principles and techniques are available at each of the interface levels in the Epicor application - system, module, and program. Workshops focus on each of these levels and guide you through each navigational principle introduced. Recommended Industry Knowledge: Experience in other database generator programs. Fundamental knowledge of relational database concepts, such as table relationships, records, and field types. Understanding the functionality of the current release of the Epicor application.
Environment Setup
The environment setup steps and potential workshop constraints must be reviewed in order to successfully complete the workshops in this course. Your Epicor training environment, in which the Epicor demonstration database is found, enables you to experience Epicor functionality in action but does not affect data in your live, production environment. The following steps must be taken to successfully complete the workshops in this course.
Epicor 9 | 9.05.601
6 | Database Concepts Course 1. Verify the following or ask your system administrator to verify for you: Your Epicor training icon (or web address if you are using Epicor Web Access) points to your Epicor training environment with the Epicor demonstration database installed. Do not complete the course workshops in your live, production environment. Note It is recommended that multiple Epicor demonstration databases are installed. Contact Support or Systems Consulting for billable assistance. The Epicor demonstration database is at the same service pack and patch as the Epicor application. Epicor's education team updates the Epicor demonstration database for each service pack and patch. If your system administrator upgrades your Epicor application to a new service pack or patch, he or she must also download the corresponding Epicor demonstration database from EPICweb > Support > Epicor > Downloads and install it. If this is not performed, unexpected results can occur when completing the course workshops. Your system administrator restored (refreshed) the Epicor demonstration database prior to starting this course. The Epicor demonstration database comes standard with parts, customers, sales orders, and so on, already defined. If the Epicor demonstration database is shared with multiple users (that is, the database is located on a server and users access the same data, much like your live, production environment) and is not periodically refreshed, unexpected results can occur. For example, if a course workshop requires you to ship a sales order that came standard in the Epicor demonstration database, but a different user already completed this workshop and the Epicor demonstration database was not restored (refreshed), then you will not be able to ship the sales order. Epicor's education team has written the course workshops to minimize situations like this from occurring, but Epicor cannot prevent users from manipulating the data in your installation of the Epicor demonstration database. 2. Log into the training environment using the credentials manager/manager. If you are logged into your training environment as a different user, from the Options menu, select Change User. From the Main menu, select the company Epicor USA (EPIC03). From the Main menu, select the Main Plant.
3. 4.
Epicor Software
Overview | 7
Overview
The following section provides an overview of the database topics related to the custom report generation process. Field and Table Name Identification When writing custom reports and queries, a fundamental requirement is to identify the tables within the database that contain the data required for the report. Additionally, you must identify the names of the fields used to store the data. The Customization Tools, the Data Dictionary Viewer, and the Field Help > Technical Details sheet are helpful tools for field and table name identification. Field Help > Technical Details The Field Help feature is a quick reference tool that provides a brief description of the field and a technical property reference for the selected field. It also provides data dictionary details for the field in focus on the maintenance program. Customization Tools Customization Tools are designed to modify system sheets and displays. In this course, you will use Customization Tools only as a look-up tool to help identify table and field names. Data Dictionary Viewer Use the Data Dictionary Viewer to identify the fields and tables needed for a customization or a custom report. This program is also an aid during upgrades, as you can view the current database structure to compare it against a previous database version. Table Linking Processes and Requirements This course also discusses the table linking process and requirements. This involves topics relative to table join concepts, requirements, and the use of indexed fields to create the table link. Using the Dataset Relationships Tracker and applying the appropriate join type aid in the table linking process. Dataset Relationships Tracker The Dataset Relationships Tracker displays the relationships between the Epicor application dataset in a dashboard format. Use this tracker to create custom reports and queries, as it helps you create joins between the tables within the query or report. Join Types Once you understand the table linking process, the next step is to define the three join types available when writing a custom Crystal report: inner, left outer, and right outer joins.
Epicor 9 | 9.05.601
2. 3. 4.
Epicor Software
Identify Table and Field Names | 9 Note To view technical details, you must have permission to access the corresponding business object. This permission is set in Process Security Maintenance for the bo.DataDict business object. The technical details of the Field Help are valuable in understanding the table structure of the database. Keep in mind that data can reside in multiple tables. The query topic displays where the data comes from. You can also use the Customization feature to locate tables and fields.
Epicor 9 | 9.05.601
7. Navigate to the Part > Plants > Warehouse > Bin Information > Detail sheet and place the cursor in the Bin field. Record the table and field ________________________. 8. Exit Part Maintenance.
Epicor Software
Customization Tools
Use the Customization tools as an alternate method of identifying tables and fields. Example To create a shipping activity report that lists the tracking number assigned to the shipment, use the Customization Tools to locate and identify the name of the table and field that contain this data.
Epicor 9 | 9.05.601
Epicor Software
Tables
Data Dictionary Viewer > Tables Use the Tables sheet to find and select the database table to review. The Data Dictionary Viewer is organized by tables. A table is a set of fields that contain related information. Example Use the Customer table to store all your customer records. The OrderHed table records your order header records. Data is often stored in multiple tables, each with a specific purpose. Use the Search option to display tables in a grid format. The grid includes a brief overview of the tables and helps determine which table to use when a field is located in more than one table.
Fields
Data Dictionary Viewer > Fields > Detail Use the Fields sheet to display specific information about each selected field. All values for a selected field, such as format, label, and description, display on this sheet. Each table contains various fields. These items are individual pieces of information associated with the table. Each field has a unique name.
Epicor 9 | 9.05.601
14 | Database Concepts Course Note The customer table includes the identifying code for the customer (CustNum), name (Name), and other specific details about the customer. The Data Dictionary Viewer properties are also available in the Technical Details area of the Field Help. When accessed through the Field Help, the details are specific to the selected field.
Epicor Software
Epicor 9 | 9.05.601
Table Linking
In the table selection process, it is important to link tables together. Use one or more common fields to aid in reporting by selecting field data from multiple tables to create links. Table Links Link tables so the records from one table match related records from another. This linking process involves using a common field between the selected tables. For example, if you activate an Orders table and a Customers table, link the tables so each order from the Orders table can be matched with the customer from the Customer table that made the order. Reporting or querying tools use this connection to identify related records between tables. In the above example, the linking process ensures the data in each line of the report refers to the same order. Table Link Requirements Table link requirements involve linking from one table to another. The from table is the primary table, while the to table is the lookup table where records are looked up by the primary table. For example, if the Quote is the primary table, the querying or reporting tool chronologically goes field by field through the Quote table and searches for matching records in the second table, which can be customers, until all fields are evaluated. Link Types The main link types are one table to another or one table to multiple others. One table to another - The primary table and the lookup table have a one-to-one relationship between their records. One table to multiple others - The primary table and the lookup table have a one-to-many relationship between their records. Indexed Fields An index field points to a data location which is a named path designed within the database in order to quickly locate and store data or to easily retrieve data in a table. The index name and path, or index order, are identified in the Data Dictionary Viewer and on the Field Help > Technical Details sheet. Note Always use the Company field as it is the first indexed field and it is located at the top of the Epicor application table hierarchy. The data of each company is stored and separated from other company data using the Company ID field. Since every table uses the Company field, it is an indexed field and you must select it as one of the fields to use in a join. There are no exceptions to this rule. You must select the Company field as a join field pair when linking tables because company is at the top of the table hierarchy in the Epicor application. Your report will not provide the correct results if this field is not used in the join.
Epicor Software
Table Linking | 17
Additional Information
The following concepts help you search for and view field information. Advanced Search Use the Advanced Search features to locate specific field data. Enter the Dataset ID, Parent data table, or Child data table. Click the Refresh button to search for a specific value(s). Dataset Relationships Grid To display the data for all records that link to this tracker, click the Refresh All button. The tracker retrieves all linked records, starting with the first record, and displays the datasets in the Dataset Relationships grid.
Epicor 9 | 9.05.601
6. Navigate to the Dataset Relationships sheet to view the relationship between the OrderDtl and OrderRel tables. Record the join fields _______________________________________. 7. Exit Dataset Relationships. If an Advanced Search does not return a dataset, the tables do not directly relate. This does not mean you cannot join them. Use the Data Dictionary Viewer to determine probable join fields.
Join Types
This section defines the three available types of joins and identifies when each type is used during the report creation process. The join types are inner join, left outer join, and right outer join. Inner Joins An inner join, also known as an equal join, is the standard join type. The report output from an inner join includes all the records in which the linked field value in both tables is an exact match. Records from either table that do not have a match in the other table are excluded from the report. The following diagram shows this relationship:
Epicor Software
Table Linking | 19 Example Join the Customer table to the OrderDtl table and create a view of customers and the orders they placed. In this case, only customers with placed orders are included in the report. Records for customers who have not placed orders are excluded. This join is typically used when the report needs to display only matching records between the primary table and the lookup table. Left Outer Joins The report output from a left outer join includes all the records in which the linked field value in both tables is an exact match. It also includes a row for every record in the primary, or left, table in which the linked field value has no match in the lookup table. Crystal Reports fills in the record fields with empty values when there is no exact match. The following diagram shows this relationship:
Example When using a left outer join to view all customers and orders the customers placed, you also get a row for every customer who has not placed any orders. These customers display with blanks in the fields that would otherwise hold order information. Right Outer Joins In general, a right outer join works in exactly the same way as a left outer join, but in reverse. The report output from a right outer join includes all the records in which the linked field value in both tables is an exact match. It also includes a row for every record in the lookup, or right, table in which the linked field value has no match in the primary table. Again, Crystal Reports fills in the record fields with empty values when there is no match. The following diagram shows this relationship:
As in the previous example, when using a right outer join to view all customers and orders they have placed, you also get a row for every order without an assigned customer. These orders display with blanks in the fields that would otherwise hold order information. The use of right outer joins is discouraged, as you can always rewrite your report to use left outer joins, which tend to be more portable and easier to read and use.
Epicor 9 | 9.05.601
Conclusion
Congratulations! You have completed the Database Concepts course. Please take a moment to let Epicor know how to serve you better by completing a course evaluation at http://www.keysurvey.com/survey/191084/2e21/ or by clicking the Course Evaluation link below. Your feedback provides the guidelines for the future direction of Epicor education.
Epicor Software