Postgresql Table Inheritance Example Oop