Database Concepts
Database Concepts
EDE8510905
90521-10-9231-583101001
10.2.200
Revision: March 01, 2018 11:12 p.m.
Total pages: 20
course.ditaval
Database Concepts Course Contents
Contents
Database Concepts Course.....................................................................................................4
Before You Begin....................................................................................................................5
Audience.........................................................................................................................................................5
Prerequisites....................................................................................................................................................5
Environment Setup..........................................................................................................................................5
Overview.................................................................................................................................7
Identify Table and Field Names.............................................................................................8
Field Help Technical Details..............................................................................................................................9
Workshop - Use the Field Help..................................................................................................................9
Customization Tools......................................................................................................................................11
Workshop - Reference Customization Tools............................................................................................11
Activate Developer Mode................................................................................................................11
Identify Table and Field Names........................................................................................................11
Deactivate Developer Mode.............................................................................................................12
Data Dictionary Viewer..................................................................................................................................13
Tables.....................................................................................................................................................13
Fields......................................................................................................................................................13
Workshop - View Tables and Fields.........................................................................................................14
Find a Table.....................................................................................................................................14
Review Field Details.........................................................................................................................14
Table Linking.........................................................................................................................16
Join Types......................................................................................................................................................17
Conclusion.............................................................................................................................19
This course reviews the table and field name identification process using Field Help, Customization Tools, and
the Data Dictionary Viewer functionality. It also describes table linking procedures and requirements as well as
join type definitions and specifications.
A fundamental requirement when modifying or authoring custom reports or queries is to identify which tables
within the database contain the needed data, and which field names are used to store that data. Hands-on
workshops guide you through examples of each task.
Upon successful completion of this course, you will be able to:
• Explore table and field name identification methods, including Field Help, Customization Tools, and the Data
Dictionary Viewer functionality.
• Identify relationships between parent and child tables and understand the linking processes and requirements.
• Display the Dataset Relationships Tracker to identify the fields to include in the join that links the selected
tables.
• Define the available table join types of inner, left outer, and right outer joins.
Read this topic for information you should know in order to successfully complete this course.
Audience
Prerequisites
To complete the workshops in this course, the necessary modules must be licensed and operating in your training
environment. For more information on the modules available, contact your Epicor Customer Account Manager.
It is also important you understand the prerequisite knowledge contained in other valuable courses.
• An Introduction to Epicor ERP Course - This course introduces navigational aspects of the Epicor application's
user interface. Designed for a hands-on environment, general navigation principles and techniques available
in two user interface modes - Classic Menu and Modern Shell Menu. Workshops focus on each of these
modes 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.
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 version as the Epicor application. The
demonstration database is installed from the Epicor Administration Console using the "Add Demo
Database" command under Database Server. See Epicor ERP installation guides for details. If you are an
Epicor Cloud ERP customer (and have licensed embedded education), the demonstration database is
installed for you.
• 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. If you are an Epicor Cloud ERP
customer see section below.
2. Log into the training environment using the credentials epicor/epicor. If you are logged into your training
environment as a different user, from the Options menu, select Change User.
3. From the Main menu, select the company Epicor Education (EPIC06).
Note To refresh your Epicor training data, send a request that includes your site ID to
SaaSEdRefresh@epicor.com. Refreshing your training data may take up to 72 hours after the request is
received.
Overview
The following section provides an overview of the database topics related to the custom report generation process.
The first requirement of any report or query is to locate the data. The Epicor ERP database is a relational database
and therefore, all data is stored in a collection of tables and fields.
A common question occurs when writing reports or queries, especially for the report writer who is not familiar
with the database structure and naming conventions. The question is, I know where the data is entered and
located, but where do I find the table and field name?
This is a typical question, and the answer becomes easier over time as you are exposed to the database. For
purposes of writing a custom report or query, you already know where certain data that is critical to the report
is entered.
What is not necessarily known is the specific database table or field names for the data. Application tools are
available that aid in table and field identification. These tools include the Field Help, Customization Tools, and
the Data Dictionary Viewer.
When you create a query or report, the type of information you need in the query and a time frame is usually all
the information you receive. Next comes the challenge of determining where the data is located.
Every user interface form is a small database that contains a collection of tables and fields that display data. First
determine how and where the information was entered in the Epicor application.
For example, a query or report is built to demonstrate a part listing that displays part and part bin information.
Ask yourself the following questions:
1. What kind of information should I include in a query or report that displays parts? - Write down
probable fields.
4. Where do I enter part bin information? - Enter part bin information in the Warehouse Maintenance
table or the Warehouse Bin Maintenance table. These tables are in the Part > sites > Warehouses > Bin
Information sheet in Part Maintenance.
The Field Help feature is a quick reference tool that provides a brief field description and the technical property
reference for selected fields.
To enable Field Help, from the Help menu, select Field Help and click a field in the interface.
The Field Help sheet contains two menu items:
• Field Level Help - The Field Level Help is a text description of the field from the Application Help. You can
use Field Help as a learning tool, as it allows you to access documentation for each field.
• Technical Details - The technical details include the data dictionary information for the field. You use the
technical specifications for a field when building business activity queries (BAQs), using Business Process
Management (BPM) methods, and other advanced functions of the Epicor ERP application.
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.
In this workshop, use the Field Help to find table and field names.
The Field Help provides a Technical Details sheet to display the data dictionary information for a selected field.
The properties that display are helpful when you create a Business Activity Query and discuss the Data Dictionary
Viewer.
• Field Name - Displays the field name as defined by the Epicor application. This name is used in all expressions.
• EpiBinding - Displays the tables (epiDataViews) stored in memory on the client workstation. The syntax is
always <Tablename>.<Fieldname>. For example, the field displays Part.PartNum, which means the table is
the Part table and the field to pull into the query is the Part Number field.
• DB Field - Displays the database field property which also displays as <Tablename>.<Fieldname>. When you
create or modify reports, the DB Field property defines the field in the report layout. While usually a direct
connection exists between the DB Field and the EpiBinding, in some cases fields in the epiDataView are not
found in the corresponding data table.
• Format - Describes the database format for this field and the number of characters to which that field is
limited.
• Like - Use this field to validate a BAQ search and generate Foreign Key Views to indicate the common field
between two tables or datasets.
3. Place the cursor in the Field Help sheet header and click the push pin icon to dock the Field Help window.
5. In the Field Help sheet, click Technical Details and view the information.
You can adjust the Field Help width to see the fields properly.
6. Navigate to the Part > Sites > Warehouses > Primary Bin sheet and place the cursor in the Bin field.
The properties populate with the data in this field. The table and field combination display in the EpiBinding
field of the Technical Details in the format of <table>.<field>.
7. Navigate to the Part > Sites > Warehouses > Bin Information > Detail sheet and place the cursor in the
Bin field.
Notice the database field is different.
Note Data is often stored in multiple places, and table selection depends on the purpose of the query.
This example presented a part's listing with a part bin location.
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.
1. In the User ID field, search for and select epicor (Epicor System Admin). Click OK.
If you are an Epicor ERP Cloud customer, select <YourSiteID>-epicor, for example, 94815-epicor.
5. Depending on whether you are in the Classic Style interface or the Modern Shell interface, you activate
Developer Mode in different ways:
• Modern Shell - From the Home page, click the Settings tile. Verify General Options is selected. Click
the Developer Mode link.
A check mark displays next to this option, indicating Developer Mode is active.
• Classic Style - From the Main menu, click the Developer Mode button on the top toolbar. You can
also select Options > Developer Mode.
Notice the Developer Mode button is highlighted, indicating this mode is active.
5. Move or resize the Customization Tools Dialog window so the Tracking Number field is visible on the
Customer Shipment Entry window.
6. In the Customer Shipment Entry window, click the Tracking Number field.
7. In the Customization Tools Dialog window, in the EpiBinding section, in the EpiBinding field, view the
table and field names.
The full identifier for the Tracking Number field is ShipHead.TrackingNumber. This means the column
name is TrackingNumber and it is located in the ShipHead table.
9. Close the Customization Tools Dialog window, and do not save changes.
a. From the Main menu, click the Developer Mode button on the top toolbar.
Notice the Developer Mode button is no longer highlighted on the toolbar, indicating this mode is not active.
Use the Data Dictionary Viewer to find and review details of each field and table within the database. Use this
program to better understand the purpose and data values of each field.
The Data Dictionary Viewer helps you to identify the fields and tables you want 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.
Important In Epicor ERP version 10, user-defined columns are placed within separate UD tables. For
example, the Part table may have a corresponding Part_UD table.
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
Use the Fields > Detail 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, and
each field has a unique name.
Example The Customer table includes the identifying code for the customer (CustNum), name (Name),
and other specific details about the customer.
Tip 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.
This workshop demonstrates how to use the Data Dictionary Viewer to identify fields and tables.
Find a Table
2. You first need to indicate which Table Schema Type you will review. Available options:
• System - Displays the tables used for the application framework. Use this option to review the business
activity query (BAQ) tables, the user defined tables, and so on.
• Product - Displays the tables used for application processing. Use this option to review the job, sales
order, AR invoice, inventory, and similar tables.
• Intermediate - Displays the intermediate tables that move data from the user interface out to the
database. These tables are similar to the Product tables, but they all begin with the IM prefix.
For this exercise, select the Product radio button option.
Now use the Data Dictionary Viewer to review the details for a specific field.
4. The Field Name displays the selected field. If you need, you can use the Navigation toolbar to display a
different field.
5. The Format field defines the layout for the characters within the field. This value displays in either schema
or alphanumeric format. Notice in this example >9.99 displays.
6. If this field is a Decimal type (see the Type field description below), the Decimals field displays how many
decimal positions are available within the field.
7. The Extent field indicates how many items you can store within this field for each record. If this value is
higher than one, it indicates multiple values can appear within this field. For example, if 5 displays, the field
can contain up to five items.
8. The Type field defines the selected field’s main data definition. The type defines the data that displays within
the field; for example, nvarchar, integer, bit.
9. The Initial Value field defines the beginning value, if any, that automatically displays within this field. It
indicates the default value that appears each time a user views this field.
10. If this field is displayed on a grid, the Column Label field indicates the text that appears at the top of the
grid column; for example, Discount %.
11. The Label field displays the title that appears above the field on a sheet, for example, Discount %.
12. When selected, the Mandatory check box indicates the current field is required. To finish a record within
this table, users must either enter data or select an option within this field.
13. The Description field displays the concise explanation for the field. This text explains the field’s purpose
and other useful information.
14. The Display Format section contains options that change how the selected field’s information displays on
the Fields sheet. Available options:
• Schema – Displays the field’s schematic values. These values define how the database views and evaluates
this field’s data.
• Alphabetic – Displays the field’s alphanumeric values. Use these values to help you understand how the
field’s data appears on the interface.
15. Continue to review the fields you need in this table. When you finish, exit the Data Dictionary Viewer.
Table Linking
You link multiple tables together to display the data you need within a business activity query (BAQ) or a custom
SQL Server Reporting Services (SSRS) report. You link one or more fields the tables have in common so the data
displays together in the output.
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.
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.
Important Always use the Company field as it is the first indexed field and it is located at the top of the
Epicor ERP 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, you must select this
indexed field as one of the primary linking fields 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.
Join Types
This section defines the available join types and identifies when you would use these table relationships while
creating custom business activity queries (BAQs) and custom SSRS reports.
Matching rows from {left joined table} and {right joined table}
A Matching rows from {left joined table} and {right joined table} join is the standard join type. The report
output from this 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 or query
results. The following diagram shows this relationship:
Example Join the Customer table to the OrderDtl table and create a view of customers and the specific
orders they have placed. In this case, only customers with sales orders are included in the report or query
results. Records for customers who have not placed orders are excluded from the data output.
You typically use this join when the report or query needs to display only matching records between the primary
table and the lookup table.
Example When using a All Rows from {left joined table} join to view all customers and orders these
customers placed, you also get a row for customers who have not placed orders. These customers display
with blanks in the fields that would otherwise hold order information.
You typically use this join when you want to display all the records from one table to contrast the activity
in another table. When joining the customer and sales order tables, this join relationship is useful when
you want to see which customers have not recently placed an order.
All Rows from {left joined table} and {right joined table}
An All Rows from {left joined table} and {right joined table} join includes all the data from both tables. The
tables are linked together and the output is not restricted, displaying the complete set of data from both tables.
The following diagram shows this relationship:
Conclusion