Database join in the '60s with tape / punch cards only?

In the 60's you would most likely

  • You store your data in a Master-File sorted in Key sequence
  • Sort the Punch-Cards to a temporary Disk file.
  • Do a Master-File Update using the Temporary Disk file (transaction File) and the master file.

They might of used a Indexed-file or some Database (e.g. IMS) if online access is required.

Master File Update

For a Master File update both files need to be sorted in to the same sequence and you match on keys, it writes an updated master file using the details from the two. It Basically like a SQL Outer join.

Logic

Read Master-File
Read Transaction-file

While not eof-master-file and not eof-Transaction-file
   if Transaction-file-key < Master-File-key
      Write transaction-file details into updated-master-file
      Read Transaction-file
   else_if Transaction-file-key == Master-File-key
      update Master-File-Record with Transaction-file-details
      Write updated-master-file-record to updated-master-file
      Read Transaction-file
   else
      Write master-file-record to updated-master-file
      Read Master-File
   end_if
end_while

Process Remaining Transaction-file records
Process Remaining Master-file records