Table.Field method

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jul 6 09:33:34 CDT 2006


On 7/6/06 2:06 AM, "Joakim Schramm" <joakim at astrocalc.com> wrote:

Hi Joakim,

> Ok then it's clear to me, thanks.
> 
> Just a design question, is it a bad idea to have 1 table with many fields or
> better to split them up in several tables, I am mostly thinking of
> performance?

Valentina prefer tables with smaller number of fields.

So if logically you can split values to group it can be good.
 
> I have to store almost 700 different values for 1 record, values that is
> calculated and stored once but then only read. All this is stored in a UDT
> (User Defined Type) structure, containg sub structures and and arrays.

Hint: if you not index that values, even possible pack them into BLOB as
e.g.   Array of ints [200]
 

> As an example, I have 1 group of 8 different values stored in an UDT and an
> array(34) As UDT. So just this batch of values will make 280 fields I one
> table. 

Again, for arrays which keep values which you not need to index you can use
    FixedBinary     -- good for array of fixed size
    VarBinary       -- good for array of var size
    BLOB            -- good for array of unlimited size

> But I can also store this as 35 sub records in a table with 8 fields,
> + 1 internat Index field (values 1 to 35) + an ObjectPtr pointing to main
> record. 

> This seam to me being a better structure

RIGHT!

> and can more easily loop
> through internal index and put into UDT and array. But what about
> performance? I ask as it's a pretty complex design to build, not only in
> table structure but also in code so like to do it "right" from start.

You should prefer records to fields.
 
> I think it would be 7-8 tables that need to be read, 2 in the style as above
> and the others much simpler. Only 1 record will be read at a time, mostly,
> sometimes 2 or 3 records, but still in a manual select style like clicking
> in a list will load 1 record. I think valentina can do this fast and nicely,
> right? 

yes

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list