The easy way would be to just use Text fields. I don't think MySQL allocates
a ton of space for them. Given that space doesn't seem to be a problem for
most websites these days (hard disks are cheap!!), time is usually the
limiting factor. So if it's easy and wastes a little space, you should
probably consider just going ahead with it.

However, this really isn't the place for this discussion. I would suggest
asking in a database related forum/list to find out more information about
this problem.

HTH,
Eric



On 2/15/07, mallyone <[EMAIL PROTECTED]> wrote:
>
>
> Here's the situation, I'd like to build a profile which can have
> fields added to it as time goes on.
>
> I'd like to have one table defining the fields that I would like to
> add to the profile (ie. favorite rock group, favorite colour etc...)
> these attribute definitions would be in a attribute_definitions table
> (for instance).  When a user fills in a profile attribute, that
> information will go into a table called profile_attributes which would
> have id, attribute_definitions_id, profile_id, and a single column for
> holding the user attributes.
>
> This seems to be a pretty good way of doing things and would make
> searching dead easy.  The only problem is  what datatype would the
> attribute content column have?  I would think my only options are text
> and blob regardless of the data.  This seems hugely ineffecient but I
> don't know enought about how well mysql handles this.
>
> I guess I could have a column for each basic type of data that might
> be held in it (ie. a column for text, varchar, int, float etc). but
> that would be harder to search.
>
> There has to be a pattern or snippet I could use as reference for what
> I'm trying to do?
>
> Thanks in advance.  m...
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to