Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2006
    Posts
    1

    Unanswered: Header and Detail Tables

    I am running a very old db2 database on an IBM iSeries system and am looking to redesign the entire applications in Java and the database in the latest DB2 version.

    The current DB is divided into tons of header and detail tables. I have seen recent publications where it seems that the practice now is NOT to split you data into header or details tables.

    I just want to do a sanity check to see if that is actually the bet way to go on a new design. Any feedback appreciated.

    Thanks

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Personally, I prefer to use header and detail tables. I have not seen these recent publications, so I do not know their justification for denormalization. To me, normalization just makes sense. It will take up less space. It can be faster, especially when you just need the data in the header table. It also help prevent data corruption when "header" data on denormalized tables is changed on one row but not others. Then there is when you have to change "header" data, you then have to change it on all rows in the denormalized table instead of just one row in a normalized header table.

    HTH

    Andy

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by MMLL
    I am running a very old db2 database on an IBM iSeries system and am looking to redesign the entire applications in Java and the database in the latest DB2 version.

    The current DB is divided into tons of header and detail tables. I have seen recent publications where it seems that the practice now is NOT to split you data into header or details tables.

    I just want to do a sanity check to see if that is actually the bet way to go on a new design. Any feedback appreciated.

    Thanks
    You need to give an example of what you mean.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    What do you mean by "header and detail tables" I am not familiar with these terms in the context of database design.

    They are used in User Interface context: like header is a 'person', and detail contains zero, one or more of his 'known addresses', past or present.

    In a database environment this header-detail concept is one a one-to-one basis translated in two tables: one for the PERSON and one for the ADDRESS. An address in the ADDRESS table will contain a refecence to the record of person 'John' in the PERSON table. This is called a parent-child relationship: the child record (ADDRESS) has a references to the parent record (PERSON).

    Is this what you meant ? If it is, leave it as it is. You will get yourself into mayor trouble if you would change it. It is called "normalisation". I guess you know what it is, but if you don't, read a book or take a course about database design, it is not complicated, but it is a basic skill you need to have if you want to do anything serious on a database.

    What you may have read is that in data warehouses, for ease of use and reasons of speed, all this information is denormalised into one big table. It is usefull if you want to make reports, based on this, but it is not meant to be used to add/alter/delete data like in a production environment.
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •