Related boolean columns -- seperate columns or bitpacked into an integer column?

Posted by Earlz on Stack Overflow See other posts from Stack Overflow or by Earlz
Published on 2010-05-26T18:19:28Z Indexed on 2010/05/26 18:21 UTC
Read the original article Hit count: 150

Hello I have a database for a certain record where it needs to store a 1 or a 0 for each day of the week. So which one would be better? Bitshifting each bit into an integer and just having an integer in the database named days or should we make all of them separate boolean values so to have sunday, monday, tuesday... columns?

© Stack Overflow or respective owner

Related posts about sql

Related posts about best-practices