Joined: Sun Oct 12, 2003 4:21 pm Posts: 16 Location: Stockholm, Sweden
|
Hibernate version: 2.1.7
Name and version of the database you are using: MySQL 4.1 and MS SQL Server 2000.
Hi, I'm designing storage for 30 checkboxes in the GUI and I don't know what datatype to use. There will be lots of records (1.000.000+) and I must be able to query on individual checkboxes.
I have been thinking of three alternatives.
* 30 separate properties mapped to 30 char(1).
* A single string property of length 30, holding 0's and 1's mapped to a char(30).
* I never played with bit fields, is that an alternative? Do Hibernate and MySQL have good support for bit fields? (query on single bits)
What is best, and are there better options I'm not aware of?
|
|