On Dec 29, 2008, at 12:25 PM, Eric Day wrote:

Hi Tim,

On Mon, Dec 29, 2008 at 10:43:08AM -0600, Tim Soderstrom wrote:
Now, to draw the line, I'd like to have a TIME type, but I don't really
think it would be the place of the DB to provide various formats to
display the time. Only one - namely HH:SS. If I want to display that as "17 hours, 9 minutes" that is something that application should do. Or at
least something Drizzle shouldn't provide as a core offering.

To be fair, if the TIME type can be made into a plugin I'd be happy
pulling it out of the core of Drizzle.

I'd have to disagree here. I think support for specific types like
this should be all or nothing. It's kind of like giving you INTs,
but then not allowing you to add or subtract them. :)  If we want to
support this natively, I'd keep all the functionality around it.

This does seem very much like a second-class type though (a simple
underlying INT being the core), so I'd vote for a set of UDFs or
possibly a UDT to handle it, if anything at all. This of course
gets back into the philosophical debate of how much context and
functionality should be in the DB, and so far it seems Drizzle has had
more of a focus on simple storage and not logic and display functions
(pushing more to the application).

Ah but is the philosophical debate something the DB has to do, or something the developer can do? People have different needs and, at some point, "one-size-fits-all" rarely does. Some people might like the idea of having uber-consistency in the database. Others just need super fast access and don't really care about those things. I know, initially, Drizzle was meant to be a micro-kernel design. That would mean that something like TIME might be a UDT. I'd disagree making them UDFs though. INET_NTOA and INET_ATON, again, are great examples. These functions, in a perfect world, would be masked behind an IPv4 type. That way, whenever the user selects from it, it's always the right output (same goes with inserting it). Using functions to do that is for from elegant and prone to people not doing it right (like not realizing such functions exist and storing IPs as strings).

$0.02

Tim











_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to