made arbitrarily sized databases work