Spliting the type of tables into hash or record type