model inheritence and relational databases

Kris wrote:

Okay the problem I am trying to get to grips with is how inheritence and
data storage in a relational database can work...

I can easily have a model inherit from other models and if the
difference between the two models is fairly small STI works well... But
once you start adding more and more functionality (well properties
actually) STI becomes messy and you want to split the single table up in
to multiple table keeping one table per model...

What is the best way to tackle this?

Take a look at Class table inheritance
http://www.martinfowler.com/eaaCatalog/classTableInheritance.html. If this
concept suits you, you can give class table inheritance plugin a try at
http://rubyforge.org/projects/clti/. Disclaimer: I'm its author.

Guest wrote:

Sava Chankov wrote:

Kris wrote:

<SNIP>

What is the best way to tackle this?

Take a look at Class table inheritance
http://www.martinfowler.com/eaaCatalog/classTableInheritance.html. If
this
concept suits you, you can give class table inheritance plugin a try at
http://rubyforge.org/projects/clti/. Disclaimer: I'm its author.

--
Sava Chankov

Thanks Sava, thats the word I needed, CTI. Ive had a good google and I
have found quite a few discussion and implementations but nothing stable
or that does not remove certain ActiveRecord features...

My implementation hopefully does not remove any ActiveRecord feature. It has
some unit tests, but test coverage is far from complete - I'd like to add all
inheritance tests from ActiveRecord. The plugin also has not been performance
tested.