1) holds the project details eg. project title, project outline etc
students can pick from these projects
2) holds the project owners, eg when a project is picked its owner is entered into this table showing that the project has been picked and which student has picked the project and has a foreign key pointing to project details
3) holds the project files which the student will submit for a project and has a foreign key pointing to project details
4) holds the project grades which a lecturer will assign to a student for a
project and has a foreign key pointing to project details
ive decided to create a class for each table ( i assume this is the correct way of doing it???) . for example the class project will have methods getProjectName(), createProject() etc. while the class projectgrades will have methods deleteFile(), viewFile() etc.
now due to the hierarchial design of my tables ive decided to implement the classes in a similar fashion
as a result of the relationship between the classes i thought it best to use inheritance eg. the projectowner class inherits the projectDetails class and likewise with the projectgrades class and projectfiles class.
now i have also created a database operations class that performs all of the mysql querys eg, inserting, updating removing table data. but the problem arises when i try to implement this dataopertions class. what id like to know is how exactly do i implement this class in each of the classes ive named above in order to manipulate the database tables??? im failrly sure i dont use inheritance because the database opertions class doenst model a real world object. all i want to know is how does the class for each table make use of the services of the database operations class, what would be the best way of doing this???
any help on this would be much appreciated. its driving me mad!!