let table_by_name_opt = fun db name ->
    try
      Some (table_by_name db name)
    with
      | Not_found -> None