@@ -451,25 +451,22 @@ var provider = SingleFileStorageProvider.Open("mydb.scdb", options);
451451// Now record of 4058 bytes fits in 8KB page ✅
452452```
453453
454- #### Option 2: Use BLOB Storage for Large Data
454+ #### Option 2: Store Externally
455+
455456``` csharp
456- // Don't store huge strings as regular columns
457+ // Don't store huge strings as columns
457458// Instead, use a reference/ID
458459
459460var row = new Dictionary <string , object >
460461{
461462 [" UserId" ] = 1 ,
462463 [" Name" ] = " John Doe" ,
463- [" BioFileId" ] = " bio_12345" , // Reference to external blob
464+ [" BioFileId" ] = " bio_12345" , // Reference to external file
464465 };
465466
466467// Then separately store large file:
467468var largeFile = File .ReadAllBytes (" large_biography.txt" ); // 10 MB
468- blobStorage .WriteLargeBlob (" bio_12345" , largeFile );
469-
470- // On read:
471- string bioFileId = (string )row [" BioFileId" ];
472- byte [] largeBio = blobStorage .ReadLargeBlob (bioFileId );
469+ // Use your own file management (filesystem, cloud storage, etc.)
473470```
474471
475472#### Option 3: Normalize Your Schema
@@ -853,7 +850,7 @@ var options = new DatabaseOptions
853850var provider = SingleFileStorageProvider .Open (" mydb.scdb" , options );
854851```
855852
856- #### Solution 2: Use BLOB Storage for Large Strings
853+ #### Solution 2: Store Externally
857854
858855``` csharp
859856// Don't store huge strings as columns
@@ -863,12 +860,12 @@ var row = new Dictionary<string, object>
863860{
864861 [" UserId" ] = 1 ,
865862 [" Name" ] = " John Doe" ,
866- [" BioFileId" ] = " bio_12345" , // Reference to external BLOB
863+ [" BioFileId" ] = " bio_12345" , // Reference to external file
867864 };
868865
869866// Then separately store large file:
870- var largeFile = new byte [ 10 _ 000 _ 000 ] ; // 10 MB
871- blobStorage . WriteLargeBlob ( " bio_12345 " , largeFile );
867+ var largeFile = File . ReadAllBytes ( " large_biography.txt " ) ; // 10 MB
868+ // Use your own file management (filesystem, cloud storage, etc.)
872869```
873870
874871### How Pages Are Allocated
@@ -1134,7 +1131,7 @@ If total > 4056 bytes → ERROR!
11341131
11351132** For larger strings:**
11361133- ✅ Increase page size: Use 8KB, 16KB, or 32KB pages
1137- - ✅ Use BLOB storage: For data > page size
1134+ - ✅ Store externally: Use filesystem or cloud storage references
11381135- ✅ Normalize schema: Split into multiple records
11391136
11401137** What Happens If You Try to Store Too Much?**
@@ -1164,6 +1161,16 @@ catch (InvalidOperationException ex)
11641161// Code that causes this:
11651162// if (recordData.Length > MAX_RECORD_SIZE) // MAX_RECORD_SIZE ≈ 4056
11661163// return Error("Record too large for page");
1167- ```
1164+
1165+
1166+
1167+
1168+
1169+
1170+
1171+
1172+
1173+
1174+
11681175
11691176
0 commit comments