let table_by_name = fun db name ->
    List.find (fun t -> t.ta_name = name) db.db_tables