December 31, 2010 at 2:55 am
@Toby Harman
More flexibility and the ability to change the workflow more easily?
- True
Just to be capable of handling future changes in the workflow, like this one that I'm dealing now, and don't need to redesign the tables...
A reduction in the number of columns in your table?
Not the main goal, but has to be reduced by the normalization. Like i wrote before, i put all in the same table because i was learning the business process and developing at the same time, so the table was built incrementally without any thoughts in the possibility of workflow changes, but now i have to change this. I could easily add some more columns to handle the new department, but if in the future the process changes by reducing the number of departments then i can't just remove the columns...
we get paid the princely salaries
Not here, i must do the job of a bunch people (analyst,programmer, database architect, database administrator, tester), and only get one poor salary... :ermm:
About the queries, my only problem it's to put the hands again, in some complex and complicated queries that i had created... 😛
January 3, 2011 at 2:58 pm
Just to be capable of handling future changes in the workflow, like this one that I'm dealing now, and don't need to redesign the tables...
I'm sorry to say that I believe it is necessary to re-work these tables to allow this.
August 9, 2011 at 2:57 pm
Its a great question. It reminds me of a human stem cell that can become one of about 250 specialized cells in the body. There are design patterns for this in OOP languages but DBAs tend to stick to Codd's rules of normalization.
I've often felt there was a trade off of creating specific tables for each state if the data requirements were radically different for each processing state. That would also simplify the state change rules in your procedures by spreading them out over many state specific procs. In most of my projects there is only a stored procedure "interface" so the actual tables are always hidden inside the "object" and implementation won't matter for the programmers.
On the other hand, if you use different tables for each state, many SELECT procs may need to be updated to handle each new state table that is added. You'll end up with lots of joins and unions.
I prefer NOT NULL foreign key columns so as to eliminate OUTER JOINS so I lean towards the one table per state implementation but only if your rules are so complex as to warrant treating the 'object' as a separate table/entity.
You may create composite views on subsets of states to handle the retrieval problems. You may also break off the varying sets of columns per state and create child tables to handle them (just to avoid numerous columns being null and technically not available per some states).
August 12, 2011 at 12:14 pm
Bill Talada (8/9/2011)
... but DBAs tend to stick to Codd's rules of normalization.
May be this is because Codd put together the basics of the Relational Theory and we are dealing with Relational Databases (RDBMS) 😀
By the way, we DBAs also tend to use normalization only for OLTP systems while rely mostly in Dimensional Modeling for DSS like Data Warehousing.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.August 12, 2011 at 1:10 pm
No one has really solved the "impedance mismatch" between developers using Objects in their code and DBAs using Relational tables. I've seen some implementations where just primary keys and sort keys are stored as columns while all other object attributes get stored in one big XML column. XML is elegant in how it can adapt to new schema versions in a backward compatible way. It also allows for tree structured data that is more natural than the CODD parent/child table setup that we are used to. We add a lot of unnecessary querying for tree structured data that applies only to one row in a table, storing child/branch data in many tables that will never be reported on from lower levels.
But, of course, a pure Object Oriented Database has the opposite problem of slow retrieval due to search items being difficult to access; one must instantiate the object to pull out the proper attribute just to see if the row meets the selection criteria.
Whoever solves this mismatch problem will become a very rich person some day.
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply