Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011

    Unanswered: A column (attribute) with differnt domians


    I have (let us say) an abject and hypothetically let us say CAR, this object can have attribute and these attributes might have different type domains. for example, the car speed is 200 and the car does not have an airbag

    So I can have something like this

    Attribute (attribute_id attribute name)
    1 speed
    2 has air bag

    and I have

    table car_attribute (car_id .., attribute_id.., attribute_value boolean ) or

    table car_attribute (car_id .., attribute_id.., attribute_value real ) or


    What are the design options and is there is a special features in postgres helps in this design.


  2. #2
    Join Date
    Nov 2003
    Provided Answers: 8
    This is what the hstore module is for.

    PostgreSQL: Documentation: Manuals: PostgreSQL 9.0: hstore

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts