Hi all,
Im writing a application that should allow the user to define custom fields, aswell as system ones. For example this is what i've come up with:
Property
-----------
PropertyID
.. Blah ..
Facility
-----------
FacilityID
Name
IsSystem
FacilityPropertyLink
-----------------------
PropertyID
FacilityID
Value
So, the facility table stores things like "Bedrooms", "Bathrooms" etc, some are marked as system and therefore cannot be deleted.
Then to assign these values to a property you use the FacilityPropertyLink table, where you enter the propertyid, facilityid for the value you are entering, and the value.
I just wanted to know if anyone has any comments on this?
Is this a good solution? or is there a more standard method of doing stuff like this?
I thought it would be bad practice to actually edit the table programatically?
Matt.
Im writing a application that should allow the user to define custom fields, aswell as system ones. For example this is what i've come up with:
Property
-----------
PropertyID
.. Blah ..
Facility
-----------
FacilityID
Name
IsSystem
FacilityPropertyLink
-----------------------
PropertyID
FacilityID
Value
So, the facility table stores things like "Bedrooms", "Bathrooms" etc, some are marked as system and therefore cannot be deleted.
Then to assign these values to a property you use the FacilityPropertyLink table, where you enter the propertyid, facilityid for the value you are entering, and the value.
I just wanted to know if anyone has any comments on this?
Is this a good solution? or is there a more standard method of doing stuff like this?
I thought it would be bad practice to actually edit the table programatically?
Matt.