I brought enough for the whole class, so I didn't just need to send my
thoughts to Roland.

-Sheeri

---------- Forwarded message ----------
From: Sheeri K. Cabral <[EMAIL PROTECTED]>
Date: Oct 10, 2008 7:42 PM
Subject: Re: [Drizzle-discuss] VARBINARY
To: Roland Bouman <[EMAIL PROTECTED]>

On 10/10/08, Roland Bouman <[EMAIL PROTECTED]> wrote:
>
> > Of course, this means that a pluggable type needs to be able to be done
> > in a sensible way. Defining the types through SQL a-la the standard is
> > retarded. SQL is a query language for crying out loud.
>
>
> I think this is a very interesting thought and I would love to see
> this feature. Personally I have never looked in detail into the
> standard with regard to user defined types so I cannot comment on how
> retarded that is.



What I am wondering about is how you think about defining (or maybe i
> should say, overloading) operators for user-defined type. I mean, it
> seems to me that specifying values of a certain type (and eventually,
> storing them) is one side of the story. THe other is making stuff like
> +, =, and function calls work. (and I guess as an extra, indexes on
> custom types)
>
> What do you think? Is this something you feel should be part of the
> type definition? If not, how will values of custom types interact with
> expressions that use them?


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.

I think something like a URL type or even e-mail address type are ripe for
having their own data types, since they are well-defined in RFC's.  An
e-mail address type could have a special index structure that could index
both the username and the domain name.  An IP address type could do implicit
conversions of strings such as "127.0.0.1" for storage to a 4-byte
(unsigned?) int, and convert back to strings for retrival and display
purposes.  We can store and retrieve now with INET_ATON and INET_NTOA, but
having it done for us would be neat.....it shouldn't have to add lots of
code bloat to do that.

That's the type of stuff that has real "value add" IMO.  Sure, I can always
have a REVERSE(email) field whenever I have an e-mail field, and do IP
calculations myself, but this is the kind of lower-level work that is
tedious and redundant for developers, and makes them use ORM's because they
just can't understand relational databases.

-Sheeri



-- 
- Sheeri K. Cabral

Note:  Currently I work for The Pythian Group (http://www.pythian.com/ ), a
remote DBA firm, and consulting would constitute a conflict of
interest.  However, I do recommend our work, and if you're looking for DBA
work (I do MySQL work, but they have great Oracle and SQL Server DBAs too)
right now, whether you need a few hours a week, or someone fulltime while
you continue a job search.

I have a webpage with tips on how to find a DBA:
http://sheeri.net/how-to-find-a-dba/
I can recommend http://www.toomanyconnections.com as a good site to find
MySQL (and Oracle) DBAs.
If you're looking for web design, I recommend the small business my husband
works for, http://www.digital-loom.com
I regret that I have no other information for any other type of position,
including developer, programmer and systems administrator.
_______________________________________________
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