Original Plan that has been modfied for mwbasic
The program maintains up to 1200 records in memory using four parallel arrays — R() for auto-increment IDs, N0() for program names, N() for disk numbers, and N2() for active/deleted flags — with working variables A1$ and A2$ handling user input and A5/A6/A6
/A6 supporting search queries. The data is stored in sequential file called DBMWB.DAT, now 3 files, with each record stored as a comma-separated line in the format id,name,disk,flag. The command set mirrors core SQL operations: Insert adds a new record with the next available ID, Select lists all active records, Select Where filters by a nominated field and search term, Update modifies a record by ID, and Delete performs a soft delete by setting the flag to 0 rather than removing the line. A Vacuum command rewrites the file with deleted records stripped out — equivalent to SQLite's own VACUUM — and a Count command returns the number of active records. The conceptual model is essentially identical to a lightweight embedded database like SQLite.
The program maintains up to 1200 records in memory using four parallel arrays — R() for auto-increment IDs, N0() for program names, N() for disk numbers, and N2() for active/deleted flags — with working variables A1$ and A2$ handling user input and A5/A6/A6
/A6 supporting search queries. The data is stored in sequential file called DBMWB.DAT, now 3 files, with each record stored as a comma-separated line in the format id,name,disk,flag. The command set mirrors core SQL operations: Insert adds a new record with the next available ID, Select lists all active records, Select Where filters by a nominated field and search term, Update modifies a record by ID, and Delete performs a soft delete by setting the flag to 0 rather than removing the line. A Vacuum command rewrites the file with deleted records stripped out — equivalent to SQLite's own VACUUM — and a Count command returns the number of active records. The conceptual model is essentially identical to a lightweight embedded database like SQLite.
