I was wondering it is a good idea to creat one object (one class) at PHP for each table on the DB.
I have for example 3 tables: user, video, rating
Rating is just a table with idUser, idVideo and the rating the user gives to the video.
Lets say, its a relation with an attribute converted to table on the DB.
I have created two classes at my system: user, video
Should i create another class for rating? Or i should get the rating info through a method inside user or video?
Yes, create a class.
Even if the advantages are not obvious right away, it will be very useful when you will have to add other attributes like “DateVoted” for example.