Let us consider this short real-life example:
One day, I was helping the guys at our local Housing Agency to build a new online form that was going to feed the database with candidates for the government’s low-cost housing benefit. Months later, after the solution was on-air and people had fed in their information, the same small Scrum team was responsible for building reports on that data.
One of our team members had left the project for another job and up to that moment we were alright implementing everything as demanded from above. But one thing happened to catch my attention: there were some data that, at first sight, did not have any correspondence among the report and the database.
We went up and down the documentation trying to figure out how to map all the report fields and the database we had (one born for the other for a very simple task). Despite the database was well documented, apparently, very little could be done to solve the problem and deliver the reports on time. Where the reports asked for marital status, income range, and information of the kind that usually go in combo boxes we only could find numbers (integers) in the database!
After some hours we were struggling with that, I decided to open the code, find and clamp what had the possibility to be the data structure I was looking for.
An enumeration is a complete, ordered listing of all the items in a collection. The term is commonly used in mathematics and theoretical computer science (as well as applied computer science) to refer to a listing of all of the elements of a set. – Enumeration – Wikipedia, the free encyclopedia https://en.wikipedia.org/wiki/Enumeration
I believe in the benefits, agree and support the values of Scrum and really think of it as the closest approach to good effectiveness of a small team dealing with multiple projects, and I also would never consider that colleague that left the team a bad or average programmer (actually he is one of the best programmers I’ve met in my journey). The fact is that pressure and heat generated some bad gases in that event. The exhaust valve for the major part of OO programmers is called “enum”.
That situation inspired me to observe more that “enum” thing and during some other experiences with that whatchamacallit datatype I was convinced I would be able to research a little and maybe bring something useful for the scientific and software development communities (for those that my words convince, of course).
For that reason, I’m going to start a series of posts that will depict in parts my monograph
“THE PERSISTENCE OF ENUMERATIONS IN POSTGRESQL DATABASES AND THE QUALITY IN BUSINESS INTELLIGENCE”, freely translated from the original in Portuguese, and where I expect to introduce the view of some authors on Software Design Science, Business Intelligence, THE ENUM, and some other things, usually related in a BI environment and, above all, to decipher the enumerations and when and how it’s better to use them.
As database people we sometimes feel uncomfortable when developers tend to use certain methods, so, my proposal to answer the question “When to use enums?” came up after some debate among our professional circles. Some colleagues support my point of view and some avoid or do not like it. All in all, there is still a gap between code and data. Let’s explore it?
Text: Pedro Carneiro Jr.
Revision: Luis Cláudio R. da Silveira
These are the posts on the same “Enum and Quality in BI” monograph:
- When to use Enums?
- About The Software Design Science – Part 1 of 2
- About The Software Design Science – Part 2 of 2
- About Business Intelligence (BI)
- About Business Intelligence: The Relationship Between Data, Information and Knowledge
- About Business Intelligence: The Quality of Data
- About Business Intelligence: The Quality of Information
- About Business Intelligence: The Relationship Between Operational Information and Managerial Information
- About Business Intelligence: The Adequacy of the Information to the Business Needs
The images used in this post, edited or not, are Creative Commons (CC) and the originals are credited to their creators and can be found at:
- Genders (toilet sign) – ClipArts.co (http://cliparts.co/clipart/3661110)
- Traffic Lights – ClipArts.co (http://cliparts.co/clipart/266951)
- Rainbow colors – ClipArts.co (http://cliparts.co/clipart/2880)
- Ten Commandments – Cliparts.co (http://cliparts.co/clipart/1111106)
- Solar System – WorldArtsMe.com (Edited from http://worldartsme.com/solar-system-word-clipart.html#gal_post_28340_solar-system-word-clipart-1.jpg)
- 3 States of Matter – WorldArtsMe.com (http://worldartsme.com/3-states-of-matter-clipart.html#gal_post_89796_3-states-of-matter-clipart-1.jpg)