International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017), pp. 41-48 http://dx.doi.org/10.21742/ijwsesd.2017.4.1.05
Row Abridged Algorithmic approach to Reduce Data Row storage for Web-based Attendance System Md. Masudul Islam, and Mijanur Rahaman Lecturer, Asst. Professor, Dept. of CSE
[email protected],
[email protected] Abstract Now a day’s online student attendance system is essential for every educational institute. It is an easy to use system to take and analyze student’s attendance. Different types of attendance system have developed using different methods and technology. However, the key purpose of these systems is to store the attendance data info web-database for further analysis and report. Our paper’s main concern is to show a new approach to store attendance data effectively. In traditional approach every time a student’s attendance is taken it stores a set of single row of data into database. These tables data row will increase multiply according to the number of courses, number of classes, number of attendees, number of teachers in the institute. Our main goal is to develop this row abridged algorithmic approach to store these attendances data into database by minimizing the number of table rows. Also we will show some implemented module and analyze the data storage for performance measurement. Keywords: Attendance, encrypted, php, MySQL, Web based, Abridge.
1. Introduction There is a well connection between student‟s attendance and their performances. It‟s claimed that the students who have lowly attendance records will mostly link to poor retention [1]. According to Newman-Ford and his team‟s research, attendance is a significantly better interpreter of grade than any other aspects such as age, prior education background or even gender [2]. Though, most of the academic institutes in developing countries like Bangladesh, India, Malaysia, and Indonesia etc. are still using naïve pen-paper method to record student attendance which is time consuming and also requires a lot of work to make records, analyze, report for all student. This is a vulnerability issue for any academic process. Today there are many developed online based attendance system using RIFD, Biometric system, Barcode system etc. These systems are superb, easy to handle and appropriate to generate report. Traditionally, these systems take attendance data by using different methods or advanced technology but at the backend the data have to store in a server web-database. Our main concern is not to develop new ideas of attendance system rather than our main concern is to develop a new algorithmic approach to store these data in database without row redundancy. 1.1. Analyzing Online Student Attendance system Let us consider a scenario of average big educational institute. They have 5000 students, 100 of teachers, 3 semesters per year and each class contains on average 40 students. Where
Print ISSN: 2205-8699, eISSN: 2207-4457 IJWSESD Copyright ⓒ 2017 GV School Publication
International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017)
each student has to take 6 subjects including lab session per semester and 35 classes for each course. Then the minimum data row need to store database for single course teacher will be simply 6 x 40 x 35 or 8400. For 100 of teacher total data row need to store is 100 x 8400 or 840000. So, question comes why we are using this extra memory for simple attendance system? Below we will show an easy method to store attendance to cut this big data plan.
2. Tools and Fundamentals of Row Abridged Algorithmic Approach Here we will introduce some used tools, coding languages and special features which will help us to understand algorithm furthermore. Our developed online system has two parts; the frontend interface design is developed by HTML/CSS language. Our system contains a login module where teacher can login into their account and search students list for class attendance. Teacher can see total number students and their attendance percentages. Below we are showing some illustrated interface of our system in Fig 1.
Figure 1. Interface of Attendance system
Our raw coding and backend module is developed by PHP (Hypertext Preprocessor). A simple scripting language commonly used for online development. PHP contains some special features that help us to optimize the algorithm. A special feature of PHP is associative array. PHP associative array can take any number of comma-separated key => value pairs as arguments. [3] For example, according to this php array A = array ("foo" => "bar", "bar" => "foo") data value of A [„foo‟] is “bar”. We used VARCHAR type because VARCHAR is a variable length string data type. It holds only the characters when we store to it. VARCHAR takes up 1 byte per character, + 2 bytes to hold length information. [4] For example, if you set a VARCHAR (10) data type = „MAD‟, then it would take up 3 bytes (for M, A, and D) plus 2 bytes, or 5 bytes in all. MySQL is the most widely used open-source client server RDBMS. [5] It‟s easy to integrate and operate with web applications. Fig. 2 shows our database table view. It also shows the data format view of data table after successful update in attendance column. Besides, we use query language to show data and join multiple tables.
42
Copyright ⓒ 2017 GV School Publication
International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017)
Figure 2. Data table view
In our algorithm we use several modified format of data. Such as, we define the attendance date format like 22092015 which is short form of 22nd September 2015. Also we reduce this 8 character date format into 2 character using associative array rules. For example, when data L9 is stored into data table actually it stores encrypted for-mat of 22nd September 2015 where L = 22nd day and 9 = 09th month, but we are not considering any years format in our algorithm. So we have declared a php associative array to define 01 to 31 days of several months into 1 to V character which is shown in Procedure 1‟s step 2.
3. Row Abridged Algorithm Procedures Our Row Abridged algorithm has three different modules. First, search the valid student list according to program, intake, section, course code of related teacher. Second, we will decrypt attendance percentage from our reduced encrypted date format. And third, we will use data row update method instead of newly insertion of data.
In procedure 1 we are fetching list of registered student in individual course in each class form main database table. The brief discussion is given below: Input: In our developed system initial inputs are a set of determinant values taken form a HTML form. Basic search criteria are student‟s program, specific course code, intake/session, section, date of attendance and a checkbox to show all the students if teacher wants to. These values are from main database table field. Output: Output is simple to show all the registered student lists from database. The query will also check whether the student‟s attendance is already given for that class or not. Predefined: An associative vector A [i] of 31 size is taken for reduced date format encryption process. Fig 3 is showing all 31 associated values declared in our associative array A [i]:
Copyright ⓒ 2017 GV School Publication
43
International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017)
Figure 3. Declaring Associative Array
Our date format such as; 22092015 is divided into two substring portions is shown in Step 1 to 3. According to algorithm the value of datestring = 2209, leftstring = 22, rightstring = 09. In next step we will get index value of array A [leftstring] = “M” and A [rightstring] = “9” form table 1 and assign the concatenated value “M9” in variable cryptodate. This cryptodate will be needed for future process in procedure 3. Finally in step 5 the conditional statement ensures that the query will only fetch those students‟ list whose attendance is yet not given for that class. Otherwise teacher could select full list option to retrieve the entire student‟s list. Also there is an extra process calling Procedure 2 to view each student‟s attendance percentage within the list. (Procedure 1): Searching registered Student list Input: A set of values (program, course code, intake, section, date, full list) Output: List of all registered student in a course. Predefined: Associative array A [31] = {'01' => '1', '02' => '2', '03' => '3', … … … '29'=>'T','30'=>'U','31'=>'V} 1) datestring = substring (date, 0, 4) 2) leftstring = substring (datestring , 0, 2) 3) rightstring = substring (datestring , 2) 4) cryptodate = concatenates array values of A [leftstring] and A [rightstring] 5) IF list is selected, then Query to fetch student id, student name, intake, attendance from data table. Also Call Procedure (2) ELSE Fetch only those student list whose attendance is not yet given for running class. 6) Exit In Procedure 2 total attendance percentage in calculating. According to our stored reduced encrypted date format attendance fetched in Procedure 1 query total number attendance is actually the half of total stored encrypted date data. For example, if the attendance is “M9N9P9R9V9” (string length of 10) then number total attendance for particular student is 10/2 = 5. Finally from data table fetch out the attendance column data which has maximum string length and calculate percentage as shown in step 2 to 3. (Procedure 2): Calculate attendance percentage Input: attendance
44
Copyright ⓒ 2017 GV School Publication
International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017)
Output: attendance percentage percent Preprocessed: attendance from data table 1) attndncstring = stringlength (attendance) / 2 2) Fetching maximum length of attendance string totalAtndnc from data table row 3) percent = attndncstring * 100 / stringlength (totalAtndnc) 4) Return percent In final Procedure 3 a set of early processed values update the data table. Following procedure contains 2 loops; the external loop is for to update data number of student selected times. And internal loop will update attendance data for per student for number of class times. Step 3 is retrieving the previous stored attendance encrypted data string for table which added with new cryptodate from Procedure 1 in Step 4. Finally in Step 5 a update query will execute to store new encrypted data in table row. Fig 3 is showing the changes of data table value after successful update. sis_std_atndnc M9N9P9
Initial encrypted data string values
sis_std_atndnc M9N9P9R9S9T9
After updating two new attendance “S9T9” latest encrypted date format
Figure 4. Before and after value update
(Procedure 3): Updating Student Attendance Input: A set of values (number of student selected, number of class, cryptodate) Output: Successfully update message or “Not Updated”. Preprocessed: Processed data cryptodate from Procedure 1 1) FOR i = 0 to number of student selected 2) FOR j = 1 to number of class 3) precryptodate [i] = previous cryptodate 4) cryptodate = concatenates precryptodate [i] and cryptodate 5) Execute update query to store new cryptodate in data table 6) Exit
4. Performance Analysis We measured our algorithm performance from two perspectives. As we have used several queries in our approach but our main concern are not inserting new data row for individual attendance rather than only update existing student attendance data for all. To measure algorithm performance we take some experimental data. Our data contains 5000 students, 100s of teachers who have to take 6 courses in a semester, 4 months semester which contains 40 classes and on average 40 students in per class.
Copyright ⓒ 2017 GV School Publication
45
International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017)
4.1. Insertion method Analysis Insertion query process execute following phases, Create Store. In our analysis, using insertion method in database the total number of data row we need to store in data table = Total Number of Classes X Total Teacher X Total Student in per class X Course taken by Each Teacher = (100 X 40 X 40 X 6) = 960000 rows We need 0.96 million of data row to store attendance data into data table. The more students the more data row will need. This is completely data row redundancy. 4.2. Update method Analysis Update query method execute following phases, Retrieve Modify Store. In our analysis, using updates method we only have to store data row equivalent to number of total student. According to our algorithm approach we need to store only 5000X6 = 30000 data row. This reduces the extra data row storing in our previous insertion method. It will effectively solve our big attendance data storage procedure.
5. Conclusion Web-based attendance system is developed to improve our academic management and performance in different level. Our new method will reduce the extra table row storage. This Row Abridged approach of using update method to store each attendance by not increasing extra row rather than updating a single column using concatenation could be a good enough solution for various big data policy in database applications. In future there is a scope of further developing by generating effective report.
References [1] L. Marr, and G. Lancaster, “Attendance System”, Learning and Teaching in Action, pp. 21-26, (2005). [2] L.E. Newman-Ford, S. Lloyd, and S.L. Thomas, “Aninvestigation into the effects of gender, Alevel points, place of residence, age and attendance on first year undergraduate attainment”, Journal of Applied Research in Higher Education, pp. 13-28, (2009). [3] PHP manual, “PHP Arrays”, Online, Available at: http://php.net/manual/en/language.types.array.php [4] MySQL manual, “CHAR”. Online, Available at: https://dev.mysql.com/doc/refman/5.0/en/char.html [5] MySQL, Wikipedia Organization, Available at: “https://en.wikipedia.org/wiki/MySQL”
46
Copyright ⓒ 2017 GV School Publication
International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017)
Authors Md. Masudul Islam, Lecturer in Dept. of CSE in Bangladesh University of Business & Technology. He has developed an entire online student management system for Bangladesh University of Business and Technology. He was the webmaster in ACM-ICPC 2014 regional contest. He has developed a full-featured online automation system for ACM-ICPC regional Dhaka site contest. His main areas of working are Web technologies, quantum physics & computing and cloud computing. Mijanur Rahaman, Lecturer in Dept. of CSE in Bangladesh University of Business & Technology. His main area of working is net-working, cryptographic security system and software base automation system. He is the developer and controller “Student Information and Management System” software of current university. He was the main webmaster and master analyzer of ACM-ICPC regional Dhaka site 2014.
Copyright ⓒ 2017 GV School Publication
47
International Journal of Web Science and Engineering for Smart Device Vol. 4, No. 1 (2017)
48
Copyright ⓒ 2017 GV School Publication