I. INTRODUCTIONGiventhewidevarietyofdatapersistenceframeworks,usuallysoftwaredevelopersfacedthedilemmaofwhichframeworktouseinordertoachievetheirobjectivesintermsofsoftwareimplementation,theshortesttime,andthehighestquality.Thestudyin[1]highlightsanddescribesthattheobject-relationalmapping(ORM)solutionisavailableinmanypopularplatforms,thatofferusefultoolsallowingdeveloperstobeconcernedaboutotherpendingissues.Theworkin[2]indicatesthatamongofthemostrelevantaspectswhenchoosingaframeworkarespeedandefficiency,whichmayhavemanyissuesduetothediversityofmetricstomeasuretheperformanceofaframework.However,thereareotheraspectsthatcouldhelptodecide,suchastheresponsespeed,theintegrationwiththedatabase,theuseoftheCPU,andtheuseofRAM.Thestudy[3],concernedaboutdataprocessingtime,reportedthattheHibernateframeworkslightlyincreasestheprocessingtimeswhencomparedtotheMyBatisframework,inanexperimentationqueryautomaticallygeneratedandvariationofcachingalgorithms.Similarly,theworkin[4]comparedHibernateagainstMyBatis,concludingthatHibernateoutperformsMyBatisintermsofavailabledocumentation,quality,robustness,andeasylearningcurve,whichmakesitidealfordevelopingsoftwareprojects.BecausetheHibernateandMyBatisframeworksarewidelyusedbysoftwaredevelopersinJavalanguageprogramming;itisdesirabletocarryoutanevaluationoftheefficiencyofbothframeworksaimingtoestablishwhichcouldbeselectedasaframeworkforasoftwaredevelopmentproject.Althoughpreviousstudiestriedtoestablishwhichisthebestone,thereisalackofadeepstudyintermsoftime,RAM,andCPUusage.Inthiswork,weprovideastudytodeterminewhethertheHibernate5.4andtheMyBatis3.4frameworksisthebestoneforsoftwaredevelopment.II. DEVELOPMENTA.Object-relationalmappingThestudy[5]establishedthatobject-relationalmapping(ORM)isatechniquethatallowsconvertingsystemdatausedinanobject-orientedprogramminglanguage,intodatausedbyarelationaldatabase.Thereby,ORMcreatesavirtualobject-orienteddatabaseoverarelationalone.Thus,allowingtheuseofobject-orientedfeaturessuchasinheritanceandpolymorphism.Thework[6]indicatedthatORMreferstotheautomaticpersistenceofobjectsfromaJavaapplicationtotablesinarelationaldatabaseandthatthemappingbetweentheobjectsandthedatabaseisdescribedinmetadata,whichisusedtoreverseeffects.Despitethisadvantage,aconsiderableaspecttotakeintoaccountabouttheuseofthistechniqueisthecompromiseoftheperformanceofapplications.Anotherstudyfromadeveloperperspective[7],concludedthatORMencompassessolutionsformappingbusinessobjectstorelationaldata,delegatingtothepersistencelayerthedetailsofitspersistence.However,ORMisnotfullyautomatic,andthatautomationisindescribable.B.DatapersistenceDatapersistencecanbeunderstoodasthemaintenanceofthestateoftheobjectaswellasitsclass,notreducingittoanyparticularprogram[8].Inamorespecificsense,datapersistenceistheabilityofacomputertoretaininformationevenaftershuttingdownorclosingtheprogramthatusesthatinformation[8],[9].25Medoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32) C.FrameworkThetermframeworkisusedinmanycontexts[11],suchasapplicationsinmedicine,computervision,games,andamongothers,inwhichitisusedtodescribeasoftwarestructureconsistingofadaptableandinterchangeablecomponentsfordevelopingapplications.Inotherwords,aframeworkcanbethoughtofassomethingincomplete,butconfigurablegenericapplicationbymeansofaddingcomplements.D.HibernateHibernateisaframeworkthatprovidesacompletesolutiontotheproblemofdatapersistenceinJava.Byinteractingbetweentheapplicationandtherelationaldatabase,Hibernateallowsdeveloperstofocusonthebusinessproblem.Hibernatealsoenablesustofollowalotofdesignrulesandspecificpatternswhencreatingpersistenceclassesandbusinesslogic.Moreover,Hibernatefurnisheshighintegrationwithmostnewandexistingapplicationswithouttheneedtomakemajorchangestootherpartsoftheapplication[6].Finally,theframeworkisanopen-sourceDataPersistenceFramework,easilycombinedwithHQLandSQLsoftware[12].E.MyBatisMybatisisanotherpersistenceframeworkthatsupportsSQL,storedprocedures,and,advancedmappings.MyBatisdoesnotrequireJDBCcode,manualparametersetting,andretrievalofresults.MyBatiscanbeconfiguredwithXML,andannotations,andallowsmapsandPOJOs(PlainOldJavaObjects)tobemappedtodatabaserecords[13],[14].F.EfficiencyEfficiencyisdefinedasthecharacteristicthatwouldallowevaluationoftherelationshipbetweenthelevelofperformanceofsoftwareandthenumberofresourcesused.Theaspectstobeevaluatedwouldbethetimebehaviorrelatedtoadequateresponseandprocessingtimes,thatistosay,theperformancewhenexecutingitsfunctionunderspecificconditionsand,ontheotherhand,theresourcebehavior,relatedtothecapacityofthesoftwaretousesuitableamountsandtypesofresources,alsooperatingunderspecificconditions[15].G.Aspect-OrientedProgrammingTheAspectOrientedProgramming(AOP)isamethodologythatprovidesseparationofcrosscuttingconcernsbyintroducinganAspect,anewunitofmodularization.Eachaspectfocusesonaparticularcrosscuttingfunction.Mainclassesarenolongerplaguedwithcrosscuttingconcerns.Theaspectweaverassemblesthefinalsystembycombiningmainclassesandcrosscuttingaspectsthroughaprocesscalledweaving.Therefore,withtheuseofthemethodology,applicationsthatareeasytodesign,implementandmaintainwouldbecreated.III. METHODOLOGYA.AboutthedatausedInthiswork,weusetheEmployeedatatableoftheOracleHRscheme.Itconsistsof10,000recordsfortests.Fourbasicqueries:selection,insertion,update,andelimination,areperformed.26Medoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32) Therest-client:ImplementsaRESTclientandthroughthreads,wesendahundredrequestssimultaneously;fiftyofwhicharedirectedtowardsaRESTserviceofhr-rest-MyBatisandtheotherfiftytowardsaRESTofhr-rest-hibernate,inthiswaywesubjectourapplicationstoastressfulsituationsinceeachRESTservicewillhavetoprocessfiftyrequestssimultaneously.Thehr-rest-mybatis:microserviceimplementedwithMyBatis.ThismicroserviceexposesfourRESTservices.B.EmployeestableDDLCREATETABLE"HR"."EMPLOYEES"("EMPLOYEE_ID"NUMBER(6,0),"FIRST_NAME"VARCHAR2(20BYTE),"LAST_NAME"VARCHAR2(25BYTE)NOTNULLENABLE,"EMAIL"VARCHAR2(25BYTE)NOTNULLENABLE,"PHONE_NUMBER"VARCHAR2(20BYTE),"HIRE_DATE"DATENOTNULLENABLE,"JOB_ID"VARCHAR2(10BYTE)NOTNULLENABLE,"SALARY"NUMBER(8,2),"COMMISSION_PCT"NUMBER(2,2),"MANAGER_ID"NUMBER(6,0),"DEPARTMENT_ID"NUMBER(4,0),CONSTRAINT"EMP_EMAIL_UK"UNIQUE("EMAIL"))C.AboutthearchitectureofthedevelopedsystemFirst,wedevelopedthreeapplicationstoperformbasicCRUDqueries.Fig1.Illustratestheproposedsystemarchitectureoftheapplication.Themodulesareoutlinedasfollows:Thehr-rest-hibernate:microserviceimplementedwithHibernate.ThismicroservicealsoexposesfourRESTservices.27Fig. 1. System architecture for our experimentsMedoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32) Next,Table1,Table2,Table3,andTable4,summarizethedetailsoftheRESTservicesimplementedinhr-rest-mybatisandhr-rest-hibernate.28Table 1. Detail of the rest service for the selection of a record from the Employee table.Table 2. Detail of the REST service for the update of a record in the Employee table.Table 3. Detail of the REST service for inserting a record in the Employee table.Medoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32) D.DeterminingtheprocessingtimeofdifferenttypesofqueriesToobtainthisinformation,oncethemicroservicesdevelopedwithHibernateandMyBatisweredeployed,wesentfiftyRequeststoeachofthemsimultaneously,andoncetheRequestswerereceivedthroughtheRESTservices,usingAOP,weobtainedthetimedifferencecapturedbeforeandaftertheexecutionofthemethoddefinedinEmployeeDAO.E.DeterminingtheRAMusageThebuilt-inTaskManagertoolintheWindowsoperatingsystemwasused;Weproceededtoopenthe“ResourceMonitor”windowandwenttothe“GeneralInformation”tabtoobtaintheinformationfromthe“Workspace(KB)”columnofthe“Memory”section,whichshowstheamountofphysicalmemoryusedinreal-timebyaprocess.F.DeterminingtheCPUUsageInthesameway,theTaskManageroftheWindowsoperatingsystemwasused;The“ResourceMonitor”sectionwasaccessed,the“GeneralInformation”sectionandtheinformationwereobtainedfromthe“CPU”columnofthe“CPU”section,whichshowsthepercentageofCPUusagebyaprocess.IV.RESULTSA.AverageprocessingtimeusingHibernateTable5showstheachievedprocessingtimewithHibernate.29B.AverageprocessingtimeusingMyBatisTable6outlinestheachievedprocessingtimewithMyBatis.Table 4. Detail of the REST service for deleting a record in the Employee table. Table 5. Average processing time of the Hibernate framework.Table 6. Table 1 .Average processing times of the MyBatis framework.Medoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32) 30C.AverageprocessingtimeobtainedwithHibernateandMyBatisTable7presentstheaveragetimeofbothframeworksforcomparison.Table 7. Hibernate and MyBatis Average Processing Time SummaryD.RAMusageusingHibernateandMyBatisTable8summarizestheRAMusageofbothframeworks.Table 8. Table 1 .RAM usage using Hibernate and MyBatis for each type of queries.Note:*ResultswereobtainedfromthedifferencebetweenmaximumandminimumRAMusedbyaprocessE.CPUusageusingHibernateandMyBatisTable9sumsuptheCPUusageofframeworks.Table 9. CPU usage when running Hibernate and Mybatis rest services for each type of query.CONCLUSIONSBasedontheperformedexperiments,wecanconcludethatHibernateismoreefficientagainstMyBatisby509.1%and47.7%forselectanddeletequeries,respectively.However,wefoundthatMyBatisismoreefficientby12.7%and14.2%forupdateandinsertqueries.TakingtheRAMontheotherhand,itwasdeterminedthatMyBatiswasmoreefficientregardingtheuseofRAMingeneralby55.2%comparedtoHibernate,specificallyby62.7%,65.9%,31.2%,and61.0%forselectionqueriesupdate,insertion,anddeletionofdatarespectively.WefoundthatMyBatisismoreefficientwithrespecttotheuseoftheCPUby20%comparedtoHibernate,specificallyby23%,25%,9%,and23%,forselect,update,insert,anddeletequeries,respectively.Medoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32) 31REFERENCES[1]A.Torres,R.Galante,M.S.Pimenta,andA.J.B.Martins,“Twentyyearsofobject-relationalmapping:Asurveyonpatterns,solutions,andtheirimplicationsonapplicationdesign,”Inf.Softw.Technol.,vol.82,pp.1–18,2017,doi:10.1016/j.infsof.2016.09.009.[2]U.Hernández,“Cómoelegirunframeworkparaelbackend,”códigofacilito,2018.https://codigofacilito.com/articulos/elegir-framework-backend#!(accessedApr.15,2022).[3]S.M.Thampi,“PerformanceComparisonofPersistenceFrameworks,”CoRR,2007,[Online].Available:http://arxiv.org/abs/0710.1404[4]J.Gavilanes,“EstudiocomparativodelaproductividadentrelosFrameworksdepersistenciaenJavaHibernateyMybatis,aplicadoalSistemadeEvaluaciónDocentedelIPEC,”2016.[5]O.Y.EnriquezandH.Gracia,“MapeoObjeto/Relacional(ORM).,”Rev.Telem@tica,vol.10,no.3,pp.1–7,2011.[6]C.BauerandG.King,HibernateinAction,vol.4,no.PartI.2005.[Online].Available:http://books.google.com/books?id=WCmSQgAACAAJ&pgis=1.[7]J.W.YoderandR.E.Johnson,“Connectingbusinessobjectstorelationaldatabases,”Urbana,2005,[Online].Available:http://test.joeyoder.com/Research/objectmappings/Persista.pdf%5Cnpapers2://publication/uuid/F7960186-CF74-482F-ADF4-86EE560C47D9.[8]E.Reinosa,C.Maldonado,R.Muñoz,L.Damiano,andM.Abrutsky,Basededatos,1sted.BuenosAires:Alfaomega,2012.[9]J.Maldonado,“PersistenciadeDatos,”UniversidaddeCuenca.http://docplayer.es/111524351-Capitulo-8-persistencia-de-datos.html(accessedApr.20,2022).[10]L.Youetal.,“JDap:Supportingin-memorydatapersistenceinjavascriptusingIntel’sPMDK,”J.Syst.Archit.,vol.101,no.June,p.101662,2019,doi:10.1016/j.sysarc.2019.101662.[11]J.J.Gutiérrez,“¿Quéesunframework?,”Availablehttp//www.lsi.us.es/~javierj/investigacion_ficheros/Framework.pdfAccessedMay,vol.12,pp.1–4,2014,[Online].Available:http://www.lsi.us.es/~javierj/investigacion_ficheros/Framework.pdf.[12]E.N.NavarreteandR.Navarro,“Desarrollodeunmarcodetrabajo(framework)paraeldesarrollodeaplicacioneswebenlaUniversidadNacionaldeCostaRica,”p.12,2017,[Online].Available:http://documentas.redclara.net/bitstream/10786/1287/1/131-17-4Desarrollodeunmarcodetrabajo%28framework%29paraeldesarrollodeaplicacionesweb.pdf.[13]MyBatis,“MyBatis–MyBatis3|Introducción,”2021.https://mybatis.org/mybatis-3/es/(accessedApr.15,2022).[14]Y.Z.Li,S.Gao,J.Pan,B.F.Guo,andP.F.Xie,“Researchandapplicationoftemplateengineforwebback-endbasedonMybatis-PLUS,”ProcediaComput.Sci.,vol.166,pp.206–212,2020,doi:10.1016/j.procs.2020.02.052.[15]M.A.AbudFigueroa,“CalidadenlaIndustriadelSoftware.LaNormaISO-25000,”Calid.enlaInd.delSoftware.LaNormaISO-9126,p.255,2012,[Online].Available:javier8a.com/itc/bd1/Normasiso9126.pdf.Medoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32) 32LOS AUTORESYolvisL.MendozaPalominoisaBachelorofSystemsEngineeringfromtheNationalUniversityofSanCristóbaldeHuamanga.HeisalsoaSystemsEngineergraduatefromthesameUniversity.Hecurrentlyworksonlarge-scalesoftwaredevelopmentprojects.Hisresearchinterestsbasicallyincludesoftwareengineering.EfraínE.PorrasFloreshasaBachelorofScienceinMechanicalEngineeringfromtheNationalUniversityofEngineering,Peru,in1981.HealsograduatedasaMechanicalEngineerfromthesameuniversityin1991.MasterofScienceinSystemsEngineeringfromthesameuniversityin2010.DoctorinSystemsEngineeringfromtheUniversidadNacionalFedericoVillarreal,Peru,2019.ManuelA.LagosBarzolahasaBachelor'sdegreeinComputerEngineeringfromtheNationalUniversityofSanCristóbaldeHuamanga,Peru,2006.HealsograduatedasaComputerEngineerfromthesameuniversityin2010.MasterinComputerEngineeringin2017fromtheRicardoPalmaUniversity,Peru.DoctorinEducationalSciencesfromtheNationalUniversityEnriqueGuzmányValle,Peru,2020.Medoza-Palomino et al. Comparative analysis of the efficiency of Data Persistence Frameworks. Case study Hibernate 5.4 and MyBatis 3.4ISSN-E:2542-3401,ISSN-P:1316-4821Universidad,CienciayTecnología,Vol.26,Núm.117,(pp.24-32)