Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Second and third normal form...

 
Dan Silva
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've been reading the head first SQL book, and they seem very bent on my using second and third normal form. But, I just had a conversation with my dad (an RPG programmer), and he says that second and third normal forms make life harder for programmers and actually slows down the process. I would like an opinion on this, as to the benefits of second and third normal form and whether or not it's realistic to apply these principles in real life database administrating. Thanks.
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dan Silva:
Hi,
I've been reading the head first SQL book, and they seem very bent on my using second and third normal form. But, I just had a conversation with my dad (an RPG programmer), and he says that second and third normal forms make life harder for programmers and actually slows down the process. I would like an opinion on this, as to the benefits of second and third normal form and whether or not it's realistic to apply these principles in real life database administrating. Thanks.


He is likely looking at this strictly from a report veiwpoint (or small shop) that provides little overall benefit to a corporation looking to implement a BI solution.

Denormalized data can be used for report tables... but a lot of effort goes into those tables and in a large information processing environment becomes very difficult to create and maintain. When you take in account the effort required to create and load the reporting table it becomes a very short-sighted solution in a business environment where ROI is the bottom line for IT development and sustainment efforts are often underfunded by the business.
[ January 18, 2008: Message edited by: Paul Campbell ]
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm an RPG programmer too and, yes, in RPG it's much easier to produce a report from a single unnormalized table rather than to have to do level breaks and get data from related tables all the time. In SQL you would just do a join or four, no big deal, but in RPG you have to explicitly write the code to mimic the joins.

However, having said that, the tables that our RPG programs work off are almost all in third normal form. There are a few exceptions, a few repeating groups here and there, and often we produce work files that are unnormalized for the purpose of reporting, but we've found from experience that trying to maintain the column relationships in a permanent unnormalized table is an exercise in futility.

Note that in SQL you often produce a table that's unnormalized when you are going to produce a report from it. That's the same thing as the RPG programmer's work file. But in both cases they are throwaway and don't need to be maintained. You only need to concern yourself with permanent data.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic