Subject Re: [firebird-support] Array's
Author Lester Caine
Uwe Oeder wrote:
> How would I create a table with an array ?
>
> CREATE TABLE DinnerCalculations
> (
>
> DinnerID INTEGER NOT NULL,
> DinnerName VARCHAR(100) NOT NULL ,
> DinnerType SMALLINT NOT NULL ,
> DinnerFoods ARRAY OF INTEGER ,
>
> PRIMARY KEY (DinnerID)
>
> ) ;
>
> Like this ?

Not with Firebird/Interbase.
How many DinnerFoods entries?

The relational database way of doing this would be to have a
separate table of DinnerFoods,
CREATE TABLE DinnerContents
{
DinnerID INTEGER NOT NULL,
DinnerFoods INTEGER
};
and then you can have as many or as few items as you need -
no need to worry about overflowing the array :)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services