Reverse Engineering

 

This question tests how well you understand the algorithm for converting E/R diagrams to relational schemas. An E/R diagram when converted to relations (using the mechanical construction that we know and love) gives rise to the following relations:

  • R(a, b, c)
  • S(a, d)
  • T(a, d, f, g)

You may assume that the same symbols refer to the same attribute and different symbols refer to different attributes (e.g., the attributes a in the relations R, S and T are the same) i.e. it ultimately comes from a single entity set or relationship in the E/R diagram.

Your task is to reverse-engineer the E/R diagram from these relations; in other words, what E/R diagram could have produced these relations. For full credit, give two different E/R diagrams that could have produced these (and only these) relations (i.e. 10 points for each correct E/R diagram).