Category: Modeling

Columns to Rows

I was doing a code review of a view that would be going into production. The view’s SELECT statement was defined as: SELECT status.STATUS_ID, status.ITEM_ID, status.REQUEST_FLAG, status.ITEM_CODE, status.PLAN_CODE, status.STATUS_CODE FROM ( SELECT STATUS_ID STATUS_ID, ITEM_ID ITEM_ID, REQUEST_FLAG REQUEST_FLAG, ITEM_CODE ITEM_CODE, PLAN_CODE PLAN_CODE, STATUS_CODE_1 STATUS_CODE FROM SCHEMA1.STATUS_TABLE UNION ALL SELECT STATUS_ID STATUS_ID, ITEM_ID ITEM_ID, REQUEST_FLAG REQUEST_FLAG, …

Continue reading

Fun with ER/Studio

I’ve been trying to work with Embarcadero’s ER/Studio Data Architect for a while now. My goal is to reverse-engineer an existing production application schema. The problem whit this schema is that there is a major lack of defined FK constraints. So any ERD reverse-engineered is mostly just entities and no relationships. Part of my job …

Continue reading