title: Implement specialized entity in ER diagram
body: <p>I'm designing a db and find a situation where im not sure what to do, so first of all lets ilustrate part of the ER diagram with an image:</p>
  
  <p><img src="https://i.stack.imgur.com/uIlic.jpg" alt="ER diagram"></p>
  
  <p>As you can see, i have the following:</p>
  
  <ul>
  <li>A device produces 0:N data's</li>
  <li>The data produced can be of different DataTypes (For example, a
  device can produce temperature data and humidity data at the same
  timestamp)</li>
  <li>A specific data was produced only by 1:1 device</li>
  <li>1:N relationship between Device and Data. Since data is a
  weak entity (cant exist data without devices), i'll have a composite
  PK in Data formed by ID_DEVICE and TIMESTAMP (not represented in image)</li>
  <li>Since a specific data can only be of 1 type, i have specialized
  "subtypes", from DataType1 to DataType10, and in case of DataType2 i
  have another specialization. Obviously, each of this entities have
  different attributes.</li>
  </ul>
  
  <p>I think the way to go is for each subtype, to inherit the PK from Data entity, since with only TimeStamp + ID_Device cant distinguish if a row is from DataType1 or DataTypeX. That means that the supertype Data entity, doesnt become a table.</p>
  
  <p>In the other hand, if i should create a table for the Data supertype, i can add a field "type" in the specialization relationship in order to uniquely identify each data row.</p>
  
  <p>¿How should i proceed in this case?
  Since i think both options are correct, which one offers more benefits and why?
  Any improvement or suggestion is allowed! :D</p>