Displaying 1 result from an estimated 1 matches for "featurable_type".
Did you mean:
featureable_type
2010 Jan 25
15
database design question: building features
...gle model/table with all the features
as fields, or a set of joined models - property, feature, feature data.
(see attached ERD diagram)
OPTION A
Properties
name
address
has_pool
has_doorman
has_etc. (a bunch of values, not all boolean)
=OR=
OPTION B
Properties
id
name
address
Features
id
title
featurable_type (polymorphic, in this case points to "property.id")
data_type
Feature_Data
id
feature_id
featureable_id (polymorphic, in this case points to "property.id")
My ingoing assumption is that we do not know all the features that can
be associated with a property, and as time goes by...