True, you can store a set of weekdays in a single column, but the real
question should be what kind of queries would you make regarding that
column. Consider if that column may be used in join, where, order by, etc.
On Dec 27, 2010 3:49 AM, "pramod.deore" <deore.pramo...@gmail.com> wrote:
> Thank you Sir.
>
> On Dec 27, 4:41 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>> Option #1: Use an INTEGER column and bit positions for the different days
>>
>> Option #2: Serialize the strings into a comma-separated list or
>> similar structure and store the result in a TEXT column
>>
>> On Mon, Dec 27, 2010 at 5:38 AM, pramod.deore <deore.pramo...@gmail.com>
wrote:
>> > Hi, I have a String array (which contains some day  from Monday -
>> > Sunday). But which days are stored is decided at runtime means
>> > sometime it want to store all day or sometime 1 or none. Now I want to
>> > store this array in database. How to save array of string in database?
>> > Or should I create 7 columns in that table?
>>
>> --
>> Mark Murphy (a Commons Guy)http://commonsware.com|
http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>>
>> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to