String Data Type for 1 to Many relationship

Anonymous
Not applicable

String Data Type for 1 to Many relationship

Hi!  I'm tryingn to figure out the best data type option to store multiple values for each lead. 

We want to pass over design preferences from our website into Marketo.  We have over 200 artwork categories that the user can select from and its a 1 to many relationship.  The user can have 10 values stored in this "Favorite" demographic field.  Is string the best data type to use?  It sounds like there is a limitation however on length of values stored.  Any suggestions?
 

Thanks!  Nimisha

Tags (1)
1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: String Data Type for 1 to Many relationship

The "best" data type has a human component -- do you want humans to be able to read this field easily, or is it just read by a machine (API), or both?

IMO the best and most flexible datatype is JSON, an industry standard for data interchange.  However, while it is somewhat readable to humans, it's not designed to be read directly in a user interface.

If you need a human-readable field, I guess comma-delimited ("Category 1", "Category 5") or pipe-delimited ("Category 1"|"Category 5"). 

I have grave doubts about any attempts to use "casual" formats like unquoted commas (Apple,Peach,Pear) because people rarely consider what happens when an option itself contains a comma, etc. Adhering to a strict format from the beginning will save you from disasters later.