You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Samuel Morgan <sa...@gmail.com> on 2007/11/09 04:54:43 UTC

Creating User Types in Derby

Hi,

Thanks for a wonderful database management system.
How do I create custom types in Derby? what would be the formal
approach in creating a geometry type for example?
Im interested as I would love to see Derby with spatial features like
postgis, and Im a postgis programmer.

Regards

Samuel H. Morgan
TryCatch Interactive

Re: Creating User Types in Derby

Posted by Daniel John Debrunner <dj...@apache.org>.
Rick Hillegas wrote:
> Hi Samuel,
> 
> I agree with Dag that this issue is a little complicated and you may 
> want to tackle something smaller first just to get familiar with the 
> Derby codeline. The objects stored in system tables, which Dag 
> mentioned, are a special kind of user defined type with a highly 
> optimized storage representation. A good place to start is to grep the 
> codeline for UserDefinedType. This will introduce you to a lot of 
> compiler support for user types.

I think that the storage support for Java serializable types is pretty 
much complete, the big part of this project will be adding the DDL (SQL 
standard part 13) and the testing.

The system columns are only special in that they implement an internal 
interface for writing themselves to disk. If they only implemented 
java.io.Serializable or java.io.Externalizable then they would be 
written by the store using those interfaces. I believe for the rest of 
the code they are just handled as a generic Java type.

Dan.



Re: Creating User Types in Derby

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Samuel,

I agree with Dag that this issue is a little complicated and you may 
want to tackle something smaller first just to get familiar with the 
Derby codeline. The objects stored in system tables, which Dag 
mentioned, are a special kind of user defined type with a highly 
optimized storage representation. A good place to start is to grep the 
codeline for UserDefinedType. This will introduce you to a lot of 
compiler support for user types.

One wrinkle of this feature is that the community will want to agree on 
SQL standard syntax for declaring user types and for using them as 
column and argument types. You will want to take a look at part 2 of the 
2003 SQL standard, sections 4.7, 11.41, and 11.49--as well as part 13, 
sections 4.8, 9.4, and 9.7. Other sections are probably relevant but 
those would be a good start.

Regards,
-Rick

Dag H. Wanvik wrote:
> Samuel Morgan <sa...@gmail.com> writes:
>
>   
>> Thanks Guys,
>>
>> I will register and see what I can do.. Id love to help or even start
>> developing it.. Im afraid I dont know where to start. Any suggestions?
>>     
>
> Great!
>
> For general information, have a look at:
>
> http://db.apache.org/derby/derby_comm.html
> http://wiki.apache.org/db-derby/ForNewDevelopers
>
> As for this particular issue, maybe Rick can offer some advice?
> Looking at how this is used internally in the system tables is
> probably a good start, e.g. in SYS.SYSCONGLOMERATES the column
> DESCRIPTOR has the type org.apache.derby.catalog.IndexDescriptor.
>
> http://db.apache.org/derby/docs/dev/ref/rrefsistabs38369.html
>
> It may be advisable to tackle some smaller issue first, so you know
> your way around a bit before you try to attack this issue. Your call :)
>
> Thanks,
> Dag
>   
>> Sam
>>
>>
>> Dag H. Wanvik wrote:
>>     
>>> Rick Hillegas <Ri...@Sun.COM> writes:
>>>
>>>       
>>>> Samuel Morgan wrote:
>>>>         
>>>> Right now you can't declare custom types in Derby. This feature has
>>>> been requested before and is tracked by DERBY-651. So far no-one has
>>>> volunteered to work on this issue.
>>>>         
>>> You can vote for it, or even better, help us develop it :)
>>>
>>> http://issues.apache.org/jira/secure/ViewVoters!default.jspa?id=12325061
>>>
>>> Thanks,
>>> Dag
>>>
>>>
>>>       
>> -- 
>> View this message in context: http://www.nabble.com/Creating-User-Types-in-Derby-tf4776240.html#a13732800
>> Sent from the Apache Derby Developers mailing list archive at Nabble.com.
>>
>>
>>     
>
>   


Re: Creating User Types in Derby

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Samuel Morgan <sa...@gmail.com> writes:

> Thanks Guys,
>
> I will register and see what I can do.. Id love to help or even start
> developing it.. Im afraid I dont know where to start. Any suggestions?

Great!

For general information, have a look at:

http://db.apache.org/derby/derby_comm.html
http://wiki.apache.org/db-derby/ForNewDevelopers

As for this particular issue, maybe Rick can offer some advice?
Looking at how this is used internally in the system tables is
probably a good start, e.g. in SYS.SYSCONGLOMERATES the column
DESCRIPTOR has the type org.apache.derby.catalog.IndexDescriptor.

http://db.apache.org/derby/docs/dev/ref/rrefsistabs38369.html

It may be advisable to tackle some smaller issue first, so you know
your way around a bit before you try to attack this issue. Your call :)

Thanks,
Dag
>
> Sam
>
>
> Dag H. Wanvik wrote:
>> 
>> Rick Hillegas <Ri...@Sun.COM> writes:
>> 
>>> Samuel Morgan wrote:
>> 
>>> Right now you can't declare custom types in Derby. This feature has
>>> been requested before and is tracked by DERBY-651. So far no-one has
>>> volunteered to work on this issue.
>> 
>> You can vote for it, or even better, help us develop it :)
>> 
>> http://issues.apache.org/jira/secure/ViewVoters!default.jspa?id=12325061
>> 
>> Thanks,
>> Dag
>> 
>> 
>
> -- 
> View this message in context: http://www.nabble.com/Creating-User-Types-in-Derby-tf4776240.html#a13732800
> Sent from the Apache Derby Developers mailing list archive at Nabble.com.
>
>

-- 
Dag H. Wanvik
Sun Microsystems, Database Technology Group (DBTG)
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101

Re: Creating User Types in Derby

Posted by Samuel Morgan <sa...@gmail.com>.
Thanks Guys,

I will register and see what I can do.. Id love to help or even start
developing it.. Im afraid I dont know where to start. Any suggestions?

Sam


Dag H. Wanvik wrote:
> 
> Rick Hillegas <Ri...@Sun.COM> writes:
> 
>> Samuel Morgan wrote:
> 
>> Right now you can't declare custom types in Derby. This feature has
>> been requested before and is tracked by DERBY-651. So far no-one has
>> volunteered to work on this issue.
> 
> You can vote for it, or even better, help us develop it :)
> 
> http://issues.apache.org/jira/secure/ViewVoters!default.jspa?id=12325061
> 
> Thanks,
> Dag
> 
> 

-- 
View this message in context: http://www.nabble.com/Creating-User-Types-in-Derby-tf4776240.html#a13732800
Sent from the Apache Derby Developers mailing list archive at Nabble.com.


Re: Creating User Types in Derby

Posted by John Embretsen <Jo...@Sun.COM>.
Dag H. Wanvik wrote:
> Rick Hillegas <Ri...@Sun.COM> writes:
> 
>> Samuel Morgan wrote:
> 
>> Right now you can't declare custom types in Derby. This feature has
>> been requested before and is tracked by DERBY-651. So far no-one has
>> volunteered to work on this issue.
> 
> You can vote for it, or even better, help us develop it :)
> 
> http://issues.apache.org/jira/secure/ViewVoters!default.jspa?id=12325061

You need to be a registered Jira user to be able to access that link and vote 
for the feature. But registration is free and simple, so that's no reason not to 
do it :)

Users without a Jira user name should simply start here:
https://issues.apache.org/jira/browse/DERBY-651


-- 
John


Re: Creating User Types in Derby

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Rick Hillegas <Ri...@Sun.COM> writes:

> Samuel Morgan wrote:

> Right now you can't declare custom types in Derby. This feature has
> been requested before and is tracked by DERBY-651. So far no-one has
> volunteered to work on this issue.

You can vote for it, or even better, help us develop it :)

http://issues.apache.org/jira/secure/ViewVoters!default.jspa?id=12325061

Thanks,
Dag

Re: Creating User Types in Derby

Posted by Rick Hillegas <Ri...@Sun.COM>.
Samuel Morgan wrote:
> Hi,
>
> Thanks for a wonderful database management system.
> How do I create custom types in Derby? what would be the formal
> approach in creating a geometry type for example?
> Im interested as I would love to see Derby with spatial features like
> postgis, and Im a postgis programmer.
>
> Regards
>
> Samuel H. Morgan
> TryCatch Interactive
>   
Hi Samuel,

Right now you can't declare custom types in Derby. This feature has been 
requested before and is tracked by DERBY-651. So far no-one has 
volunteered to work on this issue.

Regards,
-Rick