Let’s say I have a checkbox search form like this:
Check all that interests you:
- bowling
- billiard
- sweets
Can I request this data from a database instead of having to resort to adding tons of booleans to a database such as this?
(VenueId, IfBowling, IfBilliard, IfSweets)
And maybe just have one column that would contain all of those options that the venue itself has?
Alternative .. sure .. easy :
Usertable,Intereststable,UserIntereststable.UserInterestsis used to store many-to-many relation betweenUsersandInterests, and contains values which areFOREGN KEYs from said tables.P.S. You really should read SQL Antipatterns book. You would learn a lot from it.