I am creating a wordpress plugin which lets user to be able to create school management system . In this plugin user could create student marksheet , class , subjects etc.
Here I have inserted all marksheet data to wordpress options table with key "student_marksheet_details" , using
add_option('student_marksheet_details',$value_arr);
. Here will be inserted all marksheet data like student id, student class , student attendance , mark, comment etc . marksheet data of all students in all classes will be inserted here .
Now I am inserting these data to wordpress options table.
But I am not sure is it good way? or should I create custom table .
Please suggest me what will be the best way.
You are writing your own simple DB module for your plugin and using WP options as the storage mechanism. So, if you want to query, add, delete and so on, you need to work your way through the data structure and do it yourself.
You should think about how big these data structures are going to be. If the amount of data you are working with gets large, your homemade DB system is likely to be error-prone and inefficient. MySQL and other DB systems are proven and efficient.