Abr 10534
Abr 10534
7
Publication Date: July 25, 2021
DOI:10.14738/abr.97.10534.
Adamson, I. L. (2021). Using the REA Data Model in Order to Reduce Design Complexity in an Inventory Management Relational
Database, and the Need for a Relational Database Complexity Metric. Archives of Business Research, 9(7). 71-78.
ABSTRACT
With the extensive use of relational databases in the business environment there is
a need to reduce database complexity in order to avoid data inconsistency and
redundancy, which can provide a company with unreliable and/or meaningless
data and information. The use of the REA Data Model in database design can
significantly help with this problem. The model can eliminate the need for
unnecessary data artifacts which should only be generated by the system when
needed. This paper also addresses the need for a Relational Database Complexity
Metric. A simple and easy to understand metric is presented.
A database must be efficiently designed in order to avoid errors and data inconsistencies
redundancies. Data redundancy occurs when the same piece of data exists in multiple places,
whereas data inconsistency is when the same data exists in different formats in multiple tables.
Unfortunately, data redundancy can cause data inconsistency, which can provide a company
with unreliable and/or meaningless information.
Poorly designed relational databases can be very complex, difficult to maintain and prone to
anomalies. In order to avoid this situation, an effective design methodology should be used. A
common methodology is the use of the Entity-Relationship Model (ERM).
On implementation of the database, the entities become relations or tables while the
relationships reveal the logical connection between the tables. Such connections can be one-to-
one, one-to-many, or many-to-many. Fore example the figure below shows a one-to-many
relationship between the Vendor and Raw Materials Inventory entities.
This shows that the Vendor entity can provide many types of Raw Materials, but Raw Materials
can only be provided by one Vendor. The diamond shape shows the relationship has been
identified as R which could also be the verb ‘supplies’. For a number of relationships in an ERM
they can be shown as R1 to Rn. On implementation in a relational database both Vendor and Raw
Materials Inventory become tables.
How are the relationships established? Both Vendor and Raw Materials Inventory have to have
a unique identifier in order to identify each instance of the entity class. Such identifiers are
called primary keys and are usually numeric. The primary key for Vendor could be
VendNumber and for Raw Materials Inventory, RmNumber. The one-to-may relational
connection would be implemented with the Raw Materials Inventory entity having
VendNumber as the foreign key. The foreign key is implemented on the many side of the
relationship. This example can be shown by the following figure. Primary Keys are shown as PK
while the Foreign Key is shown as FK.
The database schema for the two tables that can be directly implemented into the database. The
term "schema" denotes how the database is organized or divided into tables. Th schema also
shows the primary keys, the attributes of the tables as well as the relationships between the
tables. It can be directly implemented in the database.
In order to construct an Entity Relationship Model of a system the entities or nouns are first
identified and then the relationship constructed. It would be too much for this paper to look at
a complete Inventory Management System, thus a simple example of the purchase of Raw
Materials will be examined. Possible entities, but not all, are shown in the following table:
Vendor
Purchase
Purchasing Agent
Raw Materials
Receiving
Receiving Clerk
Cash Disbursement
Cash
Cash Disbursements Journal
Controller
Relationships are shown in the following ERM as identified by R1 to R9. Each of the relationships
would have to be implemented by primary keys and foreign keys. All together there are eight
entity classes and nine relationships for this scenario. This can be seen in the following figure.
Purchasing Agent, Receiving Clerk, and Controller are all employees in an Employee table which
should be present in the database. There would be no point in creating additional tables for
these entities.
URL: http://dx.doi.org/10.14738/abr.97.10534 73
Archives of Business Research (ABR) Vol. 9, Issue 7, July-2021
In a full inventory management database system, the number of tables and relationships would
be very large resulting in a degree of complexity that would be significant. This complexity
could result in multiple data redundancies and duplication of tables. By looking at the Resource-
Event-Agent Data Model it is possible to significantly reduce such complexity.
They go on to say that it is easier to adapt a minimal model which provides for extensions, than
a complicated model with assumptions that do not fit particular situations.
Researchers have shown that using the REA Data Model to develop a relational database results
in a product that is concise and easy to understand. Rosli et. Al. (2009) applied the REA model
approach and process into a real case study of sales order and cash receipt systems. Their result
showed that REA model captures only essential aspects of economic phenomena and thus, (1)
models are kept concise and easy to understand, (2) models can be used for many applications,
and (3) derived artefacts are always consistent by means of the models. This new developed
system has resulted in the improvement in business processes efficiency. This would also imply
that such REA database systems are less complex.
Dunn et. al. (2016) discussed the issue that enterprise systems typically include constructs such
as ledgers and journals with debit and credit entries as central pillars of the systems’
architecture due in part to accountants and auditors who demand those constructs. At best,
structuring systems with such constructs as base objects results in the storing the same data at
multiple levels of aggregation, which creates inefficiencies in the database. Once again this
shows that the REA model can reduce these inefficiencies and result in a less complex database.
The REA model derives its name from the three distinct categories of entities resources, events,
and agents:
• Resources are acquired and used by the company and have economic value to the
organization.
• Events are typically business activities in which the company engages, and about which
management wishes to gather data for planning or control purpose.
• Agents include people and organizations who participate in events. Management also
needs gather data on these entities for planning, control, and evaluation purposes.
Services for Science and Education – United Kingdom 74
Adamson, I. L. (2021). Using the REA Data Model in Order to Reduce Design Complexity in an Inventory Management Relational Database, and the
Need for a Relational Database Complexity Metric. Archives of Business Research, 9(7). 71-78.
One of these events usually corresponds to a resource being given away, while the other
corresponds to a resource being received. For example, an event resulting in the purchase or
inflow of raw materials inventory must be related to an event of equal outflow of a cash
disbursement for the raw materials.
An REA diagram for the purchase of Raw Materials is shown in the following figure. It should
be noted that this is only one interpretation, depending upon the perspective of the designer.
(Source: Armitage 1985) Instead of using R1 to R5, verbal descriptions of the relationships have
been used in order to provide more clarity.
Notice that all but one agent are employees, the Vendor being an outside agent. Thus, the total
number of entities is only six with five relationships. The summary of the differences between
the Entity-Relationship Model and the REA Model can be seen in the following table.
URL: http://dx.doi.org/10.14738/abr.97.10534 75
Archives of Business Research (ABR) Vol. 9, Issue 7, July-2021
There is no journal such as the cash disbursements journal or the material receipts journal.
Such entities are an artifact of the traditional accounting/inventory control system and cannot
be classified as resources, events, or agents. The REA Model eliminates data structures that are
not necessary in the electronic era. These entities disappear since they can be generated in real
time using record detail in an REA system. An example, using pseudocode, to produce a material
receipts journal using the following tables is shown below.
From this data there would be an application program, written in a language such as PLSQL,
C++ or even COBOL, to construct the cash disbursements journal. Simple partial pseudo code
for a program is shown below.
Any reports, listings, journals and ledgers can be generated in a similar manner whenever they
are needed, not just at month or year end. It therefore can be readily seen that a database
designed utilizing the REA Data Model will produce a less complex database. But what is really
needed is a simple metric that be used to determine the complexity of any relational database.
Piattini, et. al. demonstrated metrics for relational databases, but for the average user, they are
difficult to understand and implement.
BCNF is a slightly stronger version of the third normal form in that all redundancies based on
functional dependency have been removed. By examining the Vendor and Material Receipts
tables, the following functional dependencies can be demonstrated.
In examining a table-oriented metric (TCM) the user needs to consider the simplest, least
complex version of the table in question. For example, the Vendor table has five attributes. If
this is the least number of attributes that can describe a Vendor, then the complexity metric can
be defined as follows:
TCM = 1 - Σ(number of attributes in the table)/Σ(least number of attributes needed)
This means that any table in a database must have a standard reference for the least number of
attributes needed to describe the entity. This should not be a difficult task. Any increase in the
number above zero would need to be questioned as to the necessity of the additional attributes.
A schema-oriented metric (SCM) can be determined in a similar manner.
Trying to keep the number of tables to a minimum would decease the database complexity and
encourage the designer not to add unnecessary or redundant tables. Future work will be
looking at refining these metrics, because they do not consider metrics for primary or foreign
keys as well as additional tables such as an M:N relational table or index tables.
URL: http://dx.doi.org/10.14738/abr.97.10534 77
Archives of Business Research (ABR) Vol. 9, Issue 7, July-2021
CONCLUSION
In comparing the REA Model of Raw Materials Purchase with the Entity Relationship Diagram
it is evident that there are fewer entities and relationships. The result would be reduced data
redundancy and a less complex database. The traditional model would include tables for the
Purchases Journal and the Cash Disbursements Journal which contain data that are already
present in other tables such as Purchases, Receiving and Cash Disbursements. This would be an
increase in data redundancy and adds to the complexity of the database. Any changes to these
tables would require corresponding changes to Purchases, Receiving and Cash Disbursements.
This could result in insert, update, and deletion anomalies and data inconsistencies within the
database, a situation prone to error.
Thus the REA Model results in a more simplified relational data base which significantly
reduces the chance of data duplication, data redundancy, and as a result, a data base that
requires less maintenance and is less complex.
The need for a Relational Database Complexity Metric in todays extensive use of relational
databases is obvious. The example shown is very simple but is only in the preliminary stages. It
needs to be further researched.
References
Adamson, I.L., “Reducing Complexity in an Accounting System by Using the REA Data Model to Design a
Relational Database", Journal of Accounting & Marketing,Vol. 6, No. 2, 2017.
Armitage, Howard M., “Linking Management Accounting Systems with Computer Technology,” The Society of
Management Accountants of Canada, 1985.
Calero, C., Piattini, M., and Genero, M., “Database Complexity Metrics”, QUATIC, 2001.
Piattini, M., Calero, C., and Genero, M., “Table Oriented Metrics for Relational Databases”, Software Quality
Journal, Vol. 9, 2001.
Chen, Peter, “The Entity-Relationship Model--Toward a Unified View of Data.” ACM Transactions on Database
Systems, Vol. 1, No. 1, March 1976.
Dunn, Cheryl L., Gerard, G., Grabski, S., “Resources-Events-Agents Design Theory: A Revolutionary Approach to
Enterprise System Design” Communications of the Association for Information Systems, 2016.
Haugen, Robert., and McCarthy, William E., “REA, a Semantic Model for Internet Supply Chain Collaboration”
Business Object Component Workshop VI: Enterprise Application Integration, 2000
McCarthy, William E., “The REA Accounting Model: A Generalized Framework for Accounting Systems in a Shared
Data Environment.” The Accounting Review, Vol. LVII, No. 3, (July 1982).
Hruby, P., Model-Driven Design Using Business Patterns, Springer, 2006.
Rosli, Khairina, Ahmi, Aidi, and Mohamad, Liana, “Resource-Event-Agent Modelling in Revenue Information
System RiS Development: Smart Application for Direct-Selling Dealers and SMEs” Journal for the Advancement of
Science & Arts, Vol. , No. 1, January – June 2009.