

This is an example of improved database normalisation.Ĭoncomitant with this change is an added feature “Merge All Duplicate Citations” whose effect is to replace all records in the CitationTable having the same Master Source and matching text fields (Citation Details) with one record linked via the CitationLinkTable to all the facts that its duplicates were previously attached. The one set of citation data then becomes a ‘master’ citation whose edits then carry through to all ‘uses’ of it, just as revisions to a Master Source affect all citations of it in all versions of RM. RM8 adds the CitationLinkTable which allows one set of citation data to be linked to or ‘used’ by multiple facts. To use the same citation data for more than one fact meant that it had to be replicated in another record, making revisions to the data repetitious and onerous. RootsMagic 8 introduced indirection between citation data (text fields) and the fact to which a citation is attached, In RM7, the citation data and linkage was combined in the CitationTable. or this could be TemplateID = a specific template number, to just change one template WHERE (SourceTable.SourceID = CitationTable.SourceID) WHERE SourceTable.SourceID = CitationTable.SourceID ) SET (Fields) = (SELECT cast(Replace(cast(CitationTable.Fields as Text),'','CitItemD' || SourceTable.Name || '') as blob) add extra field for name - at the start so it is used for citation name when converting to v8 or this could be TemplateID = a specific template number to just change one template

SET (FieldDefs) = cast(Replace(cast(FieldDefs as Text),'','CitItemDItem NameTextItem NameTo distinguish citationsTrue') as blob) This will only work for user templates, not for supplied ones (SourceTable.TemplateID > 10000)Īdd in new field - CitItemD for citation name and put in source name - creates good citation name in RM8 I have taken advantage of this concatenation to get meaningful names by inserting a new field in my own templates as the first one in a citation and then setting the value in the citations to the source name. So I run this script on my RM version 7 database so that it is ready for importing into RM version 8. In RM8, citations are re-useable and have a name which is made by concatenating the contents of the citation fields.
