I doubt it. A schema can contain cyclic dependencies between tables, expressed through constraints. There just isn't any good way to build an immutable data structure for that in a strict-by-default language. Copying a table to add the constraints will not work because other constraints would still point to the old table. I think the original solution is perfectly adequate. If you wanted to improve on it to get an immutable view of a schema, you could have an immutable super-trait for every mutable class, only expose the immutable traits in the public interface, and cast up after constructing it in a mutable way.