10-05-2026, 05:03 PM
(SQL, or Structured Query Language, is the standard used by database systems for over 20 years worldwide, to store, retrieve and manage structured data.)
Originally I wrote a SQL demo program and then thought why not make it actually do something useful.
MBEESQL is a relational database engine written in MicroWorld BASIC for the MicroBee Z80 running CP/M. It implements four fundamental SQL database operations known as CRUD — Create (INSERT), Read (SELECT), Update (UPDATE) and Delete (DELETE) — along with WHERE clauses for filtered searching, primary key management, and a VACUUM command to compact the database by removing deleted rows. MBEESQL brings these concepts to the Microbee, emulated using UBEE512. The BASIC program stores its data in DBMWB.DAT — a plain comma-delimited text file cataloguing the MicroWorld BASIC programs from the MBUG disk library by name and disc nos. RAM constraints prevent listing what each program does.
The flag field in each record marks it as Active or Deleted, enabling soft-delete — records are never immediately removed but flagged for later compaction. All write operations implement ACID compliance: data is written atomically to a temporary file first, then renamed over the live database, ensuring a system crash at any point leaves the data intact and recoverable. On startup MBEESQL automatically checks for and recovers any interrupted write. Browsing a large collection can be sped up by using --clock-200 in UBEE512.
Local PC access is enabled by rcpmfs, which maps a Windows folder as a CP/M drive. DBMWB.DAT is stored in that folder and updated whenever MBEESQL writes it. The beesql.html web viewer, opened in any local browser, reads the file directly and auto-refreshes every five seconds — search, sort and scroll across all 1,199 records is instant. An Excel workbook accesses the same data with filtering and charting.
Internet access via ngrok requires a small Python watcher script on the PC that serves DBMWB.DAT over a local HTTP server. ngrok creates a secure public tunnel with a stable URL. The web viewer, with one line changed to fetch from that URL, becomes globally accessible — anyone with the link can browse the MBUG catalogue in real time, seeing updates within seconds of entry on the MicroBee.
The result is a three-tier system — emulated MicroBee for SQL data entry a BASIC program, a PC as the bridge, and any browser anywhere as the front end — all anchored by a 21KB plain text file written in 1980's Microworld BASIC.
Anyone interested? I only need to get my head around ngrok to complete the proof of concept. cheers G
Originally I wrote a SQL demo program and then thought why not make it actually do something useful.
MBEESQL is a relational database engine written in MicroWorld BASIC for the MicroBee Z80 running CP/M. It implements four fundamental SQL database operations known as CRUD — Create (INSERT), Read (SELECT), Update (UPDATE) and Delete (DELETE) — along with WHERE clauses for filtered searching, primary key management, and a VACUUM command to compact the database by removing deleted rows. MBEESQL brings these concepts to the Microbee, emulated using UBEE512. The BASIC program stores its data in DBMWB.DAT — a plain comma-delimited text file cataloguing the MicroWorld BASIC programs from the MBUG disk library by name and disc nos. RAM constraints prevent listing what each program does.
The flag field in each record marks it as Active or Deleted, enabling soft-delete — records are never immediately removed but flagged for later compaction. All write operations implement ACID compliance: data is written atomically to a temporary file first, then renamed over the live database, ensuring a system crash at any point leaves the data intact and recoverable. On startup MBEESQL automatically checks for and recovers any interrupted write. Browsing a large collection can be sped up by using --clock-200 in UBEE512.
Local PC access is enabled by rcpmfs, which maps a Windows folder as a CP/M drive. DBMWB.DAT is stored in that folder and updated whenever MBEESQL writes it. The beesql.html web viewer, opened in any local browser, reads the file directly and auto-refreshes every five seconds — search, sort and scroll across all 1,199 records is instant. An Excel workbook accesses the same data with filtering and charting.
Internet access via ngrok requires a small Python watcher script on the PC that serves DBMWB.DAT over a local HTTP server. ngrok creates a secure public tunnel with a stable URL. The web viewer, with one line changed to fetch from that URL, becomes globally accessible — anyone with the link can browse the MBUG catalogue in real time, seeing updates within seconds of entry on the MicroBee.
The result is a three-tier system — emulated MicroBee for SQL data entry a BASIC program, a PC as the bridge, and any browser anywhere as the front end — all anchored by a 21KB plain text file written in 1980's Microworld BASIC.
Anyone interested? I only need to get my head around ngrok to complete the proof of concept. cheers G
