Originally Posted by
marcelo.br
Ok, if it doesn't work with struct and not with matrix.
Is there something else I could use in C that would work?
Because there are fields that are extremely huge, and others that take only a few bytes.
And it would be a huge waste of memory for me to allocate for example 500Mb of memory for all the records, since most of them will use 100 bytes!
Example: A database with 1000 records
Record 1:
Title field: Uses 100 bytes
Description Field: Using 500Mb
Record 2:
Title Field: Expends 90 Bytes
Description Field: Expending 200 Bytes
Just think, I will have to allocate 1000 x 500Mb bytes just because out of these 1000 records some 20 use 500Mb or some 980 use very few bytes!
If I can't use struct, nor matrix, how can I do this?