Difference between revisions of "Addon:Database Differences Report"

From Gramps
Jump to: navigation, search
(add detail about items not included in the report, add note about effect of automatic corrections on a DB comparison)
m (Issues)
 
(18 intermediate revisions by 8 users not shown)
Line 3: Line 3:
 
[[File:Database-differences-report-example-50.png|thumb|right|450px|Database Differences Report example output]]
 
[[File:Database-differences-report-example-50.png|thumb|right|450px|Database Differences Report example output]]
  
The '''Database Differences Report''' allows a mostly complete comparison between the currently opened database (Family Tree) and a Gramps XML file.
+
The {{man label|Database Differences Report}} allows a mostly complete comparison between the currently opened database (Family Tree) and a Gramps XML file.
  
 
=== Usage ===
 
=== Usage ===
 +
 +
[[File:Database-differences-report-ReportOptions-tab-defaults-51.png|thumb|right|450px|Database Differences Report - Report Options tab example defaults]]
 +
 
Open the family tree you want to compare then
 
Open the family tree you want to compare then
  
Line 17: Line 20:
 
* [x] Show items added in file
 
* [x] Show items added in file
  
==Issues==
+
====Limitations====
* help button shows the Reports help page, but it doesn't currently include the Database Differences Report information.
 
  
==Limitations==
+
The Database Differences Report is focused on the principal elements of the Database.
(Gramps 5.1.2 with Database Differences Report 1.0.19)
 
  
The Database Differences Report is focused on the principle elements of the Database.
 
 
There are a number of other types of 'metadata' that are not examined during the Database Differences Report.  
 
There are a number of other types of 'metadata' that are not examined during the Database Differences Report.  
  
Line 33: Line 33:
 
* etc.
 
* etc.
  
Some of these 'metadata' are not 'regular' in the way they are stored, comparing them would be a fair amount of additional code work.  
+
Some of these 'metadata' are not 'regular' in the way they are stored, comparing them would be a fair amount of additional code work.
Also note that some of the 'metadata' would be difficult to compare because they are not stored in the XML files, but rather in the Gramps initialization files.
+
 +
Also note that some of the 'metadata' would be difficult to compare because they are not stored in the backup XML files, but rather in the Gramps initialization files.
 +
 
 +
According to the author, not all changes are pertinent. For example an object that just has an updated timestamp is ignored, as are dates that may have irrelevant differences. Note that it will report changed order of list items as two different changes. It doesn't say "tag list items 1 and 2 were switched" (which would be nice) but rather "tag list, #1 [ToDo]", "tag list, #2 [Imported]" for item1 and "tag list, #1 [Imported]", "tag list, #2 [To Do]" for item2.
  
==Note regarding older backup files==
+
====Note regarding older backup files====
 
In the past Gramps allowed data to be input in ways that are no longer allowed. When you import an older backup file, many of these issues are silently corrected for you. For example, Gramps used to allow leading and trailing spaces in name fields. Gramps now removes the leading and trailing white space when the data is entered.
 
In the past Gramps allowed data to be input in ways that are no longer allowed. When you import an older backup file, many of these issues are silently corrected for you. For example, Gramps used to allow leading and trailing spaces in name fields. Gramps now removes the leading and trailing white space when the data is entered.
  
The Database Differences Report performs it's work by creating a temporary Database and importing the backup file that you specified. A side effect of this is that if your Gramps DB has been around for a long time, it may still contain things that are not currently allowed. But the comparison will be done against the backup file that has all of those issues fixed. Each has the potential of showing up as a difference, but on examination they look the same. It is quite hard to see those leading/training spaces.
+
The Database Differences Report performs it's work by creating a temporary Database and importing the backup file that you specified. A side effect of this is that if your Gramps Database has been around for a long time, it may still contain things that are not currently allowed. But the comparison will be done against the backup file that has all of those issues fixed. Each correction has the potential of showing up as a difference, but on examination they look the same. It is quite hard to see those leading/trailing spaces.
  
 
There are 2 solutions:
 
There are 2 solutions:
* backup your database, create a new empty DB and import backup you just made, then go ahead with the report.
+
# backup your database, create a new empty Database and import backup you just made, then go ahead with the report.
* run the "Clean input data" tool on your DB, then do the report.
+
# run the [[Gramps_{{man version}}_Wiki_Manual_-_Tools#Clean_input_data|Clean input data]] tool on your Database, then do the report.
  
 
==See also==
 
==See also==
* [[GEPS_009:_Import_Export_Merge#Import_Export_Merge]]
+
# [[GEPS_009:_Import_Export_Merge#Import_Export_Merge]]
* {{bug|2623}}: Import Export Merge (GEPS 009) comment: [https://gramps-project.org/bugs/view.php?id=2623#c25242 ''...A Database Differences Report has been added to gramps35/trunk (marked as 3.5):..One can now see the raw differences between an exported file and the current DB...'']
+
# {{bug|2623}}: Import Export Merge (GEPS 009) comment: [https://gramps-project.org/bugs/view.php?id=2623#c25242 ''...A Database Differences Report has been added to gramps35/trunk (marked as 3.5):..One can now see the raw differences between an exported file and the current DB...'']
* [https://sourceforge.net/p/gramps/mailman/message/30345408/ (Gramps-devel)Towards database syncing], From: Doug Blank - 2013-01-13 17:16:25, ''...allows a mostly complete comparison between the current database and a Gramps XML file...''
+
# [https://sourceforge.net/p/gramps/mailman/message/30345408/ (Gramps-devel)Towards database syncing], From: Doug Blank - 2013-01-13 17:16:25, ''...a mostly complete comparison between the current database and a Gramps XML file.''
 +
# Addon - [[Addon:Import Merge Tool|Import and merge a Gramps XML family tree]] derived from your own Gramps XML family tree backup file.
  
  
 +
==Issues==
 +
* help button does not come here.
 +
* See issues and features tagged: [https://gramps-project.org/bugs/tag_view_page.php?tag_id=369 DatabaseDifferencesReport] on the bugtracker.
 +
 +
[[Category:Addons]]
 
[[Category:Plugins]]
 
[[Category:Plugins]]
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]
 
[[Category:Reports]]
 
[[Category:Reports]]

Latest revision as of 20:05, 22 January 2024

Gramps-notes.png

Please use carefully on data that is backed up, and help make it better by reporting any comments or problems to the author, or issues to the bug tracker
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.
This Addon/Plugin system is controlled by the Plugin Manager.


Database Differences Report example output

The Database Differences Report allows a mostly complete comparison between the currently opened database (Family Tree) and a Gramps XML file.

Usage

Database Differences Report - Report Options tab example defaults

Open the family tree you want to compare then

Select Reports > Text Reports > Database Differences Report... from the menu.

On the Report Options tab select the Family Tree file: to be compared against.

Check or Uncheck the options you want to test for in the report eg: All are checked by default

  • [x] Show items that different
  • [x] Show items missing from file
  • [x] Show items added in file

Limitations

The Database Differences Report is focused on the principal elements of the Database.

There are a number of other types of 'metadata' that are not examined during the Database Differences Report.

  • researcher
  • custom types
  • gender name maps
  • base path for media
  • surname mapping for the "Group As" surname feature
  • etc.

Some of these 'metadata' are not 'regular' in the way they are stored, comparing them would be a fair amount of additional code work.

Also note that some of the 'metadata' would be difficult to compare because they are not stored in the backup XML files, but rather in the Gramps initialization files.

According to the author, not all changes are pertinent. For example an object that just has an updated timestamp is ignored, as are dates that may have irrelevant differences. Note that it will report changed order of list items as two different changes. It doesn't say "tag list items 1 and 2 were switched" (which would be nice) but rather "tag list, #1 [ToDo]", "tag list, #2 [Imported]" for item1 and "tag list, #1 [Imported]", "tag list, #2 [To Do]" for item2.

Note regarding older backup files

In the past Gramps allowed data to be input in ways that are no longer allowed. When you import an older backup file, many of these issues are silently corrected for you. For example, Gramps used to allow leading and trailing spaces in name fields. Gramps now removes the leading and trailing white space when the data is entered.

The Database Differences Report performs it's work by creating a temporary Database and importing the backup file that you specified. A side effect of this is that if your Gramps Database has been around for a long time, it may still contain things that are not currently allowed. But the comparison will be done against the backup file that has all of those issues fixed. Each correction has the potential of showing up as a difference, but on examination they look the same. It is quite hard to see those leading/trailing spaces.

There are 2 solutions:

  1. backup your database, create a new empty Database and import backup you just made, then go ahead with the report.
  2. run the Clean input data tool on your Database, then do the report.

See also

  1. GEPS_009:_Import_Export_Merge#Import_Export_Merge
  2. 2623: Import Export Merge (GEPS 009) comment: ...A Database Differences Report has been added to gramps35/trunk (marked as 3.5):..One can now see the raw differences between an exported file and the current DB...
  3. (Gramps-devel)Towards database syncing, From: Doug Blank - 2013-01-13 17:16:25, ...a mostly complete comparison between the current database and a Gramps XML file.
  4. Addon - Import and merge a Gramps XML family tree derived from your own Gramps XML family tree backup file.


Issues