From: youjun g. <you...@ya...> - 2010-03-24 14:28:00
|
> > In theory making it 100% Hibernate should solve the problem, and should > also make it consistent with the Hibernate ORM tier for data access. The > more straight SQL we have in there, the more maintenance problems or risks > we have down the road. Why does a pure Hibernate solution not work here? > Hibernate is perfectly capable of orchestrating cascading deletes. > > -hilmar > > > Based on the information I get from Bill, the historic reason why Jin Ruan bring in SQL here is because the performance issue of hibernate. I think the sql created by hibernate is not as efficient when a task involved too many tables and too many cascade deletions. To delete a matrix we need to delete all related record from study, submission, matrix, sub_matrix matrixrow, rowsegment matrixcolumn, MATRIXCOLUMN_ITEMDEFINITION matrixelemnt, STATEMODIFIER ITEMVALUE Compound_element taxonlabelset taxonlabelset_taxonlabel taxonlabel and also need to check a group of tables to see make sure a taxonlabel is not refered by some other matrices or trees. While listing of the steps above I think our database schema may need a optimizing some how. Youjun |