From: Tim Uckun Date: 2006-06-07T10:13:30+09:00 Subject: Two questions about data structures. I am building an application and would like the groups advice on the following two scenarios. 1) I have a table about an entity and there are a LOT of options about this entitiy. For example isLeftHanded? isRedHaired? doesLikeRedRoses? doesHatePolenta? etc. What is the best way to keep these kinds of binary information about an entity? Is there any harm in just adding binary fields? Should I use a large number field and OR all the time (does limit the number of options per field and makes for messy SQL though). Should I have a text field with delimited data in it? Should I join a separate table? 2) related to above: I need to keep other types of prefs that don't apply to all entitities of a type. For example: preferedInvoiceFormat, clientURL etc. The tricky thing is that it would be nice to have some defaults so that if a preference was not specified for a client then a global one could be used. It gets even more tricky when you have something like this. product, location, package, client, price. The idea is that a product will cost different amounts depending on who is ordering it, where and as a part of which package. Again there should be a way to specify defaults like so widget, *, *, *,10.00 or *,alabama,*,*,20.00. I the first example unless otherwise specified all widgets cost 10 dollars. In the second example unless otherwise specified all products in alabama cost 20 dollars. Has anybody dealt with data like this and if so how.