On Thursday, June 16, 2011 06:59:40 AM Cesare wrote:
> I am designing a db with datamapper, working with Ruby and Sinatra.
> One of my properties has to represent Time, but just hour and minutes,
> don't need year, etc.
> What do you suggest me? To use the time object anyway or a just a
> String separated by ":"?
> Which leads to the best performance (memory consumption and read/write
> speed)?

I don't know about actual performance, but it also depends what you're trying 
to do. For example, do you need to be able to sort and query by time?

In any case, I'd suggest at the very least using an 'hours' and 'minutes' 
integer field, rather that a String -- that's going to be a lot easier to 
query.

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to