I’ve been fluctuating between holding my data in database-style tables versus composite types. Things like
joining in the DB version is very useful, but things tend to stay as floats and strings. Method dispatch and custom types are very useful in the composite type system. At the end I think it falls on if things have a one-to-one relationship or one/many-to-many: If everything is unique and has just one unique thing to be connected to, then a collection of such things would be best described as a composite type with two fields, one for each “thing”. If one thing can be related to multiple things then it seems like a DB table would be best.
Of course, nothing stoops me from mixing the two. It is however hard to know where to cut it, what should not be a composite type and instead be a DB-table entry, and what should be a composite type. I think I’m down the right track with the one-to-one versus one/many-to-many distinction “described” above, but I would love to hear what you have to say if any of this rambling sounds familiar…