# How do you implement a random-access database when you don't have random-access external storage?

DevFeed: [How do you implement a random-access database when you don't have random-access external storage?](<https://devfeed.tech/articles/how-do-you-implement-a-random-access-database-when-you-don-t-have-random-access-external-storage-116366.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/oldnewthing/20261103-00/?p=112825/>)

Author: Raymond Chen

Published: 2026-11-03T15:00:00Z

Content type: article

Language: en

Sources: [Raymond Chen](<https://devfeed.tech/sources/raymond-chen.md>)

Topics: [in-memory database](<https://devfeed.tech/topics/in-memory-database.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [basic](<https://devfeed.tech/tags/basic.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [directory](<https://devfeed.tech/tags/directory.md>), [history](<https://devfeed.tech/tags/history.md>), [memory](<https://devfeed.tech/tags/memory.md>), [old-new-thing](<https://devfeed.tech/tags/old-new-thing.md>), [program](<https://devfeed.tech/tags/program.md>), [storage](<https://devfeed.tech/tags/storage.md>)

## AI overview

The Apple II telephone directory stored its records inside the BASIC program itself: it read them from `DATA` statements and used `POKE` to modify those statements when records changed. Saving the program to cassette therefore saved both the code and the directory in one pass. Although the Apple II could save a separate block of memory to tape, embedding the data avoided a second cassette load when using the directory. The excerpt is uncertain whether the data appeared in `DATA` statements or comments, but says the same principle applies.

## Source excerpt

You just store it all in memory, in your own program. The post How do you implement a random-access database when you don't have random-access external storage? appeared first on The Old New Thing.