Search code examples
databaserdbmsnormalization3nf

Is it still normalized db schema? database


I have the following db-schema .

FILE, GROUP and BLOCK represent the object structure of the XML file. FILE is the root. GROUP has FK to FILE. BLOCK has the one FK to GROUP and the another one FK to UNIT.

UNIT groups "similar" BLOCKs from diffrent GROUPs in the context of FILE.

The data base is currently in 3NF. Yet I would like to know which UNITs belong to FILE.id=1. To do this yet, I have to make a query which joins all 4 tables. To optimize this schema, I can create the new relation UNIT n--FK-->1 FILE. Yet my query joins only two tables on the optimized db-schema. And here is the question: is this DB(with this new FK) still in 3 NF ? What the theory says?

BLOCK  n--FK-->1  GROUP  n--FK-->1  FILE
 n 
 |
 FK    
 |    
 1  
Unit

or

            +--------+
      +-----|  File  |.....+
      |     +--------+     .
      |                    .
     /|\                  /.\
 +--------+           +--------+
 | Group  |--+     +--|  Unit  |
 +--------+  |     |  +--------+
             |     |
            /|\   /|\
           +---------+
           |  Block  |
           +---------+

Solution

  • From the information supplied, it appears that this is a true parallel hierarchy. On this basis, I believe that the proposed amended schema would still be normalised to 3NF.