locked
Mapping HealthVault to relational database RRS feed

  • Question

  • We have a local database. We would like to map HV Thing Types to new tables in our database.

    What would be the best approach?

    To map the new tables based on the Thing Type XML schemas?

    Or, to map them to the classes in the Microsoft.Health.ItemTypes Namespace ?

    It seems to me that the XML schemas have already been mapped to the Microsoft.Health.ItemTypes Namespace ?

    Therefore if we start with new tables, rather than existing ones, then I should map them to the classes?

    Thanks,
    Gary
    Tuesday, August 25, 2009 6:27 PM

Answers

  • Hello Gary,

    Both the approaches are fine, depending on whether you are willing to work with XML or C# classes. Both are equivalent and have the same functionality.

    As you said, the XMl schemas and the ItemTypes classes have a one-to-one matching. The naming system is the same and there is an equivalence between the two.

    Thanks and Regards,
    Aneesh D.
    Tuesday, August 25, 2009 7:50 PM

All replies

  • Hello Gary,

    Both the approaches are fine, depending on whether you are willing to work with XML or C# classes. Both are equivalent and have the same functionality.

    As you said, the XMl schemas and the ItemTypes classes have a one-to-one matching. The naming system is the same and there is an equivalence between the two.

    Thanks and Regards,
    Aneesh D.
    Tuesday, August 25, 2009 7:50 PM
  • Thanks Aneesh.

    Do you know of any database table generators for C# classes to relational databases?

    I've seen database to C# code generators.

    I've also tried the XML schema to database generator, but it doesn't work that well.

    Thanks,
    Gary
    Tuesday, August 25, 2009 11:20 PM
  • Gary-- I believe it is much more difficult to auto-generate DB tables from C# classes, and in many cases these kinds of things are places where you want to write the code yourself and not rely on some generated code.  Between performance issues and corner cases it can be tricky, and fixing and debugging the generated code can be worse than writing it from scratch.

    Just my two cents.
    Wednesday, August 26, 2009 9:30 PM
  • Thanks Lowell.

    You confirmed what I thought.

    I have always done it manually. I wanted get some expert opinions on it.

    Thanks again,
    Gary
    Wednesday, August 26, 2009 11:02 PM