I've gone for simplicity, and abandoned any attempt at making sense of the data's internal structure. Its just a Block of float values this way
CREATE TABLE BlockRef (
pKey int identity(1,1) PRIMARY KEY,
FileNo int not null,
BlockNo int not null,
itemCount int not null )
CREATE TABLE Block (
pKey int identity(1,1),
fk_BlockRef int not null FOREIGN KEY REFERENCES BlockRef(pKey),
sequence int not null -- sequence of the float value in the original file block,
fValue float )
-- Then to select an array
CREATE PROC GetDataBlock
@FileNo int,
@BlockNo int
AS
SELECT fValue
FROM Block
WHERE fk_BlockRef = (
SELECT pKey FROM BlockRef
WHERE FileNo = @FileNo
AND BlockNo = @BlockNo )
ORDER BY sequence
I think this will work and I've started on the C program to populate the data structure
I'll put some indexes on it too.