Collection Type support 
Author Message
 Collection Type support
Was wondering if DB2 has support for collection types like ARRAYS, SETS etc
....?

For example...
**************************
For every house I have multiple tables .........

create type tabletype (
)

create table house (
    table     set(tabletype),
.
.
.
.)

************************

Whats the syntax for the set(tabletype) ?

Thanks in advance,
--Kapil



Wed, 15 Sep 2004 01:42:27 GMT
 Collection Type support

Hi,

DB2 does not support collections.
If you have a small number of elements you could use structured datatype
(Phonenumber 1 through 5...).
For big arrays you can use distinct types on BLOBs.
Or good old foreing keys.

Cheers
Serge
--
Serge Rielau
DB2 UDB SQL Compiler Development
IBM Software Lab, Canada



Fri, 17 Sep 2004 02:32:19 GMT
 Collection Type support
thanks for the info !
if i may ask so wht might be the reason ?

regds,
--kapil


Quote:
> Hi,

> DB2 does not support collections.
> If you have a small number of elements you could use structured datatype
> (Phonenumber 1 through 5...).
> For big arrays you can use distinct types on BLOBs.
> Or good old foreing keys.

> Cheers
> Serge
> --
> Serge Rielau
> DB2 UDB SQL Compiler Development
> IBM Software Lab, Canada



Fri, 17 Sep 2004 14:36:26 GMT
 Collection Type support
Bang for the buck to put it plain and simple.

Collection types don't add a lot, if any, functionality.
In order to have a collection type perform better than the UDT on BLOB or
VARCHAR FOR BIT DATA approach I indicated above you need a relational mapping
(to put indexes etc on top of it) which brings you right back to the foreign
key concept.
The rest is smoke and mirrors.

Don't get me wrong I'm an OO fan at heart (typed views are mine, proudly, and
I helped standardize them :-). I think collections are nice but I don't know
customers for whom they are more than that.

If you don't agree please submit a requirement to IBM.

To underline my point research for typed table and structured type postings in
this newsgroup. They are almost exclusively from universities. Looking at the
Oracle or Informix newsgroups you won't find much difference.
Neither Oracle nor DB2 marketing have pushed to OO button despite both having
a significant feature set. MS SQL Server doesn't even bother to implement
typed tables, structured types or methods.

Cheers
Serge
--
Serge Rielau
DB2 UDB SQL Compiler Development
IBM Software Lab, Canada



Fri, 17 Sep 2004 21:51:16 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. support Collection(SET,MULTISET,LIST)?

2. is the ADOX keys collection supported by Microsoft OLE DB Provider for ODBC

3. Problems with user types and Collections!!!

4. Recordset, Array, other type of collection.

5. populating a nested collection in an object type

6. Collection Types & ESQL

7. Collection types suck?

8. Collection data types are %$^%#%$%!!!!!!

9. collection types - what are they good for?

10. About Collection Data Type

11. Recordset, Array, other type of collection.

12. Querying Collection Types in SQL3


 
Powered by phpBB® Forum Software