Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to do custom fields?

Status
Not open for further replies.

Tokhra

Programmer
Oct 1, 2003
134
ES
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top