Tree-like hierarchical self-related relations?

Is it possible to have a parent-id column that points to a existing column in the same table in the generated data?
Not like a parent table and a child table as described in other questions, but as a reference back to the same generated data.
This is an example of columns:

  • id
  • name
  • parent_id <-- points to an existing id in the same generated data

It’s not possible to refer to other rows, so you would need to compute the parent id based on a value in the row, perhaps the id, using a Formula field like:

if id == 0 then nil else id - 1 end