Le 27/05/2014 01:26, Mark Tompsett a écrit : > Greetings, Hi Mark, > Is there a reason we have what seem like two apparently similar tables > in use? It would seem to me that adding ‘field’ to > marc_subfield_structure would it identically replaceable for the > fieldmapping table. And the value would be effectively the field name > from the table without the table prepended with a dot like it is in > kohafield. None that I see.
I'm the author of the marc_subfield_structure (something like 10 years ago...) hdl is the field mapping one, and I don't remember the reason for creation of this. Looking at bz 3370 (thanks git blame updatedatabase.pl > search CREATE TABLE field mapping) I think it was to enable repeatable field mapping. The mapping of title, on bibliotitle make title non repeatable. With fieldmapping, you don't store an additional field in biblio/biblioitems, and you can retrieve repeatable values (like subtitle) I think both methods have their advantages and disadvantages : * data is easily accessible (in SQL, without any computer cost) on biblio/biblioitems, at the price of duplicating information. And no repeatability * the fieldmapping is the opposite: no duplicated information at the price of no-SQL access and calculation cost. Not sure which option is the best. Maybe we should keep only a real minimum things in biblio(items) table, and use fieldmapping more. Or we could completely refactor the code to handle that differently (and, for example, use caching to get rid of decoding XML cost). But that's another story... (1st let's plack on staff be a viable option. 2nd, better handling of caching, 3rd refactor code that cost disk, 4th refactor code that cost CPU) > The reason I’m asking is because it seems like GetRecordValue looks at > subtitle quite a bit in Koha. I noticed this while working on bug 11592. There are many C4/Biblio.pm subs that would take advantage of being refactored (like GetMarcSubjects, ...) -- Paul POULAIN - BibLibre http://www.biblibre.com Free & Open Source Softwares for libraries Koha, Drupal, Piwik, Jasper _______________________________________________ Koha-devel mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
