4.6.3Using Null Values to Combine Relations
There is one more approach to representing information ab out a hier ar chy ofentity sets.If we axe allowed to use NULL(the null value aS in SQL)as avalue in t uples,we can h andle a hier archy of entity sets with a single relationThis relation has all the att rib utes b elonging to any entity set of the hierarchy.An entity is then represented by a single tup le.This tuple has NuLL in eachattribute that is not defined for that entity.Example 4.33:If we applied this approach to the diagram of Fig.4.3 1,wewould create a single relation whose schema iS:
Movie(title,year,length,genre,weapon)Those movies t hat are not mur der mysteries would have NULL in the weapon comp onent of their tuple.It would also be necessary to have a relation Voicesto connect those movies that are cartoons to t he starts performing the voices,as in Example.