-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Design decision, use bit field or char?
PostPosted: Mon Mar 28, 2005 4:29 pm 
Newbie

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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 28, 2005 4:44 pm 
Newbie

Joined: Sun Oct 12, 2003 4:21 pm
Posts: 16
Location: Stockholm, Sweden
* 30 separate properties mapped using Hibernate built-in BooleanType.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.