Sorry, I dont have the time to create an elaborate code example right now but I will try to elaborate on my approach a bit.
The idea was to have a model that can be used as an aggregator for big amounts of data. An example could be a vehicle, for every type of vehicle there can be hundreds of attributes to describe the vehicle (model, color, combustion engine, date of manufactory etc.). So we have a model called Vehicle. I would use a model called VehicleFieldValue to store the attributes. I could also use a model VehicleType to describe different types of vehicles (SUV, Truck, Bus, etc,). Another model VehicleField would be used to define the different fields in every VehicleType.
It would look something like that::
Model "Vehicle":
Fields: id, vehicle_type_id, created, modified
Associations: belongsTo VehicleType, hasMany VehicleFieldValule
Model "VehicleType"
Fields: id, name, created, modified
Associations: hasMany Vehicle, hasAndBelongsToMany VehicleField
Model "VehicleField"
Fields: id, vehicle_type_id, name, created, modified
Associations hasAndBelongsToMany VehicleType, hasMany VehicleFieldValue
Mode "VehicleFieldValue"
Fields: id, vehicle_id, vehicle_field_id, value, created, modified
You will also need a tabel for the hasAndBelongsToMany Assoc called "vehicle_field_vehicle_type" with the fields:
vehicle_field_id, vehicle_type_id
You would need to make sure to build the correct add and edit views and also to properly save the VehicleFieldValue associated with the Vehicle correctly in the controller.
This approach is maby too complex but it would be very flexible.