We are a large company, selling frobnication services to tens of thousands of customers via phone calls. Orders get recorded on punch cards, featuring
- a customer ID
- a date
- the dollar amount of frobnication bought.
In order to process these into monthly bills to our users, we're ready to buy computing equipment modern enough for the '60s. I presume we're going to store our user database on a tape (... since... that's where you can store a lot of data with 60s tech, right?).
Sales record punch cards are coming in unsorted. Even if the records on tape are sorted by e.g. customer ID, doing one "seek" / lookup for each punch card / customer ID coming in (to update e.g. a "sum" amount) would be very slow. Meanwhile, if you have e.g. 256k of RAM (even less?), significant parts of the data set just won't fit.
My question is: how can this database operation be done in practice? Do you sort the punch cards first & then go through the tape linearly? How do you even sort punch cards? Or do you copy all of them to a tape first? Do you need multiple batch jobs to do all of this? How much of this is code we'll have to write vs. something that's coming with the OS?
(... yes I've heard about those fridge-size devices with spinning metal disks that can randomly seek many times a second; I don't think we'll be able to afford those.)