Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only

Maximo DB Architecture and Maximo Business Objects (MBOs)

By Mark Robbins posted Mon July 08, 2019 04:06 AM

  

If you have supported Maximo for any length of time then you will have read or heard about the term Maximo Business Objects.

These Java objects are at the heart of Maximo and deserve a quick, and simplified, overview.

A Maximo Business Object (MBO) is a combination of Java code and data

Each MBO represents a single database record from a single database table.

This means a Workorder MBO will contain a single row from the Workorder table. An MBO has a number of attributes that store details e.g. WONUM and SITEID. The full list of attributes for an object can be seen in the Database Configuration application.

When a user views a Workorder in the Work Order Tracking application then a “select * from workorder where …” query is executed to retrieve all the data to populate every attribute in the Workorder object.

If a user then moves to a different tab e.g. Safety Plan, then that triggers a separate query to retrieve the data from the safetyplan table and populate the SAFETYPLAN object.

The Maximo front-end reads the data from the Safetyplan object and populates the attributes on the SAFETYPLAN part of the front-end. The front-end does not communicate directly with the database.

MBOSet

An MBOSet stores the SQL query details and MBOs for a single type e.g. workorder.

A query that returns 200 records will be stored in a single MBOSet and that MBOSet will contain 200 MBOs. MBOSet and MBO counts will feature in a later post about performance problems.

 

MBO and MBOSets

Each MBO is a member of a single MBOSet.

The process of creating an MBO starts with the MBOSet creating an MBO and returning it to the Java code to be used.

Saving changes to an MBO in an MBOSet

When a value is changed on an attribute the MBO is marked as dirty to indicate that the record has changed.

A save operation operates on the MBOSet. When a save operation occurs the MBOSet Java code only saves those MBOs that are marked as dirty. The save process may be visited again in a future blog post.

 

Non persistent attributes

Some attributes are not stored in a database table and are calculated on-the-fly by the Java code when the MBO is loaded into memory or when an operations occurs e.g. a save. These are called non-persistent attributes and often confuse report developers who cannot find the data in the database.

These pieces of Java code can often execute multiple pieces of SQL or complex calculations before returning the final value.

MBOs and Database Administrators

Database administrators are often brought in to look at the queries when Maximo is under performing. A common comment is if you “change it so that it doesn’t use select * and it only retrieves the column you want then the performance will be a lot better“

From a database perspective this would lead to more efficient queries because some values could be retrieved solely from the indexes without having to query the main table e.g. workorder

Maximo can’t work like this because each MBO must have all of its attributes populated. The nature of the Maximo code means that a change to the value of one attribute could lead to Java code for another attribute being triggered. If the second attribute wasn’t populated then the data in the MBO would become corrupt.

Positive side effect of select * from queries

An unexpected benefit of the use of “The query will always use a select * from ” is that it makes it much easier to identify non-Maximo code when investigating performance problems.

If you are looking at the SQL being executed on the database and a piece of SQL is retrieving a single attribute then it is almost certainly a piece of custom code.

Further information

MBO best practice tips for developers here

More MBO tips can be seen here

Vetasi training

This simplified overview is taken from the Vetasi Java read only course.

Our SQL Tuning course explains for each of the three database types how to assess and improve the performance of the Maximo generated SQL. The course also advises on other ways to make custom SQL identifiable so you can quickly find the source of the SQL to tune.


#AssetandFacilitiesManagement
#Maximo
0 comments
45 views

Permalink