locked
How to store object oriented data RRS feed

  • General discussion


  • I'm working with a fairly complex data model for a project that has a number of layers of inheritance and i'm unsure what the best practice or pros/cons are of different approaches in MDS. An example of the class system would be

    Vehicle(registration number, attr2, attr3)
      • Motorised (fuelType, attr2, attr3)
        • Land Vehicle(hasAircon, attr2, attr3)
          • Heavy Vehicle (OperatingWeight, Size, attr 3)
            • Tractor (num wheels, num seats etc. etc.)
            • Bulldozer (x,y,z)
          • Passenger Vehicle (attr1, attr2, attr3)
        • Plane
        • Boat
      • Towed Vehicle
    Hopefully that makes sense. It seems like I'll have to make entities for each of the vehicle types as well as each superclass i.e. an MDS entity which has domain attributes that point to the parent entity eg. Entity tractor has a domain attribute of type Heavy Vehicle etc.

    The other way to possibly do it would be a hierarchy that looks like:

    vehicle type -> Land Vehicle Type -> Heavy Vehicle Type -> vehicle where each "X type" is basically a lookup. (Land Vehicle Type members would be "Heavy Vehicle", "Passenger Vehicle" for example) however it's not clear how one would store attributes that are unique to a particular vehicle unless all possible attributes are included in "vehicle" and are left unpopulated for those vehicles that dont have that particular attribute.

    Perhaps MDS isn't the best tool for this type of data? What is the best way to deal with this type of scenario? Ideally creating separate entities for each vehicle could be avoided but i also want to avoid having to create 5+ member records (and id's) to represent a single vehicle...


    Thursday, July 31, 2014 5:01 AM