Store 66 Unique Options, Choices, Or Flags In A Database.

Joined: 11/28/2008

Problem: Store 66 unique options, choices, or flags in a database.

Holy Bible Trivia would like to enhance the users preferences to select trivia only from desired 66 books in the bible.

We are currently using an integer and bitwise operators for users preferences but this will only allow for 32 selections. Even if 64 bit was an option it still would be short by 2 selections.

Separating it by testaments will work for the 27 new testament books but not for the 39 old testament books.

Thanks for all the help!

FYI: We are using java with jsp pages and a mysql database.

Joined: 11/28/2008
> We are currently using an

> We are currently using an integer and bitwise operators for users preferences

I may be off-base here, but I have to ask... why? Why not just use an integer and save a foreign key to the book. It will be simpler, easier to maintain, and have sufficient capacity for your needs. If you are looking to save space on the database, don't worry - it's got lots more capacity than a quiz system would blow. Perhaps the issue is with the database design, rather than the technical implementation.

Regards,

Pete.

Peter Connolly
Technical Director
KP Direction LLC
http://www.kpdirection.com
http://www.kids-faith.com