Design: how to store lots of booleans?
"Just" 300? That might not really be a problem, actually. How many rows do you expect in the table? If not that many, say, less than a million, then doing that might not be a huge problem.

Or if you're using PostgreSQL, as noted, you can use an array of booleans. That, I think, would be preferrable to putting each column individually in the schema.

The "best" way, however, would be a bitfield. Say, an array of a hundred 4-byte integers, with each value being one of the bits in one of those fields.  So your application could have a map of tupes, something like:

has["dog"] = (25, 18)


Noting that 'dog' would be in the 26th field (zero based), in the 19th bit. When you want to query if a record has a dog, you'd need to pull the appropriate tuple and construct an SQL statement like...

(fieldNum, bitNum) = has["dog"] # python syntax

SELECt * from tbl WHERE (has[fieldNum] &amp; (1&lt;&lt;bitNum)) &gt; 0


Finally, Postgres also has bit strings, which I've never used, but it looks like they might do the job as well. http://www.postgresql.org/docs/9.4/interactive/datatype-bit.html