Adding a column at the parent or at the child in a Table-Per-Type (TPT) inheritance RRS feed

  • Question

  • I have different types of assets , some of the assets that are technology-based should have a IP column and this IP should be unique. But non-technology asset will not even have IP column. Currently I am storing the data as follow:-

    But I am not sure where to store the IP address, I have the following approaches:-

    1. Store it in the “Asset” parent table , so I can set it as a unique key and guarantee that no technology-based asset will have the same IP. But the drawback is that the IP column will be always be null for all the non-technological assets.
    2. The second approach; is to add an IP column to each technology-based table. This will prevent null values , but need custom work to guarantee unique. as I can guarantee uniqueness only per table and not for all the technology-based assets..

    So can anyone advice on which approach I should follow OR there is another approach I am not aware of?


    Wednesday, June 26, 2013 11:19 PM