I am pretty much of a oop-noob. As I am only feeling my way round MVC I want to try and keep it simple.

I was just making a transactional script for my model, dealing with what is a fairly common requirement. Managing a small table holding 1: n relationships of other tables.

I dawned on me that I could make a basic table nomalizer, and extend it with concrete instances that fed in the table name and the name of the 2 columns.

A Major column that holds what is normally the dominant relationship (people in the eg below) and a minor column that generally holds the "n".

My table(s) will all look like this:
ID | people_ref | fruit_ref
1 | 2 | 4
2 | 2 | 3
In sketching out my ideas, using the ideas I got from making the single script:

PHP Code:
class normalizer {

// sets up PDO

//followed by utility methods
save() //insert $x and $y;
delete() {
// delete a single row
// delete from $tablename where $major = $x AND $minor = $y;
// delete all instances of a major
// delete from $tablename where $major=$x;
// select * from $tablename where major=$x;
// select * from $table name where minor=$y;
//and maybe a helper for not nulls, not int etc 
Then create a concrete class like so;
PHP Code:
class fruitEaterNormalizer extends normalizer{

Or should the concrete class instantiate the normalizer class?

Is this the way you would do it, or what is your view?

I mean it feels pretty simple, but am I reinventing the wheel?