On 10/10/08, Brian Aker <[EMAIL PROTECTED]> wrote: > > Hi! > > On Oct 10, 2008, at 4:43 PM, Sheeri K. Cabral wrote: > > Honestly, I have mixed feelings -- I think it's easy to get carried away, >> but the book "Practical Issues in Database Management" made some good points >> about having custom data types. For instance, it's perfectly legal to >> multiply numbers. Most people use a number data type for something like an >> age. You wouldn't multiply ages, though. It talks about having custom data >> types. >> > > This is one of my big complaints with the current system. It does not know > when an action like "add two URL's" would be a stupid action to take. It > will happily just "do it" and spit out some junk.
EXACTLY!!! :) The "array" I mentioned previously is the fault of this. I would prefer > objects to say "this is dumb" and to just not allow some conversions. Right. I think having a standard set of operators and standard set of types, such as we do now, is useful. Implicit conversions aren't helpful, I think errors should happen (not warnings, errors) and if people really want conversions they have to program it in. Part of that is being able to have UDT's and UDO's (user-defined operators) and being able to specify which operators are allowed to be used for a UDT. For instance, URL's would only have string compare, but they might have something like top-level domain compare, or domain-compare functions. an "email" data type would have string compare and "domain" compare, where it could grab the domain based on RFC standards of what an e-mail address looks like*.....but you could also say that + and * are not meaningful operators for this type. You would, of course, have to be able to specify what happens with mixed types. Because you wouldn't necessarily add 2 ages (you might...) but you might add an unsigned tinyint to an age. So I'd like to see pluggable data types and data operators, but that's like a dream wish list and I don't have lots of specific examples where it would make my day to have those. It'd be neat. -Sheeri * which will screw over all those poor shmucks using Exchange, which puts _ instead of a space into domains.... _ isn't allowed in MX records according to the RFC.
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

