Currently I try to solve the following problem: The document management software I´m working with can define masks for there documents and each mask has one or more indexfields (type:String). The system supports the following databases:
- Postgres 2. ORACLE 3. Microsoft SQl 4. DB2
Now I should do a research if it is possible to store the array of strings in just one field of the sql database so that each mask only takes up one line in the sql-table. One more requirement is that the array is searchable via sql.
The result should be that the sql-database isn´t as fragmented as it is now, cause every indexfield is one column in the mask definition and also in regard of performance the result should be equal (or if possible faster).
The current state is that I have working examples for postgres ( but only with Double[] so far ) and ORACLE ( via the ArrayDouble type ) with good results (no fragmentation and with performance improvements (>200%)). The examples are written in java ( standard jdbc connection ).
For DB2 I found some documentation about ordinary arrays (and two other types) but was not able to build a working example and for Microsoft SQL I was not able to find any hint that it has an array feature built in.
So my main question is if you guys have experience with this problem and can give me advice esspecially regarding DB2 and Microsoft SQL in how to tackle this problem. Also if you have an awesome solution for postgres and/or Oracle please share your knowledge with me. :)
Thanks in advance :) wish you all a enjoyable monday morning :) Greetings Pascal