COMPARATIVE ANALYSIS OF RELATIONAL AND NON-RELATIONAL DATABASE MODELS FOR SIMPLE QUERIES IN A WEB-BASED APPLICATION
Remedios de Dios Bulos, Jay-Vee Bonsol, Rhon Diaz, Adela A. Lazaro, Veronica E. D. Serra · 2013
This research investigates, provides empirical evidence and conducts a comparative study among relational and non-relational databases involving simple queries in a web-based application. Our testbed is a simple recipe recommendation system (MyRef) which (ideally) uses left-over foods in the refrigerator. For comparative analysis, the system is implemented using relational, XML and JSON database models. In the relational database implementation, records or recipes are searched, selected and fetched through SQL queries using MySQL. In the XML and JSON implementation, PHP programs are used to search, select and fetch XML/JSON recipe documents. Two types of file storage strategies are used; the first strategy involves storing each recipe in separate XML/JSON files; and the other strategy uses only one XML/JSON file to store all the recipes. Experiments involving 10 sets of test query cases are conducted. The database for each implementation consists of 1568 recipes. In recording observations for each test case, two timestamps are used. A timestamp is recorded every time a query is submitted and every time the result of the query is returned. The absolute difference between the two timestamps is used to measure the amount of time (in seconds) it takes to execute each test case. Based on the results involving all test 10 cases, SQL implementation retrieved the result set of recipes the fastest, followed by JSON and then XML.