Jump to content
TNG Community
jhculbert

Understanding How Repositories Work in TNG

Recommended Posts

jhculbert

I have downloaded my repositories.bak file from TNG

The file has the following content format, where I am now providing a copy of only the first two lines, plus one more of interest:

ID,repoID,reponame,gedcom,addressID,changedate,changedby
"1","R520","Public Records Office of Northern Ireland","Culbert","109","2017-12-13 14:35:07","4096"

"100","R619","New York State Museum","Culbert","100","2017-12-13 14:32:21","4096"

Would someone please explain in non-technical language how the addressID is used in TNG?

When I look at my file of 151 repositories, most have separate and distinct addressID, however I have 28 of them all with an addressID of 0 (zero).

Could this mean these 28 repositories no longer are associated with any source?

Also, how is the ID used in TNG?  All of these also appear to be distinct, and different from the repoID and addressID, except in one instance where the ID and addressID are the same, also shown above.

This suggests to me that this is just a coincidence, as ID and address ID operate independently in TNG.

Thanks for any advice!

 

Share this post


Link to post
Share on other sites
jayat1familytree

 

My understanding is;

ID is just the Unique ID assigned to each record in the tng_repositories table.

The AddressID is a reference to the recordID number of the address from the tng_address table.

So in your first record example, AddressID number 109  should be the address to the "Public records of Northern Ireland"

You can see the records by opening your phpmyadmin in your Hosting control panel.

The 28 records without an address are most likely Repositories that you do not have an actual address, city, state country, so TNG doesnt assign it with a record for the tng-address table.

Hope that helps.

Jay

 

 

 

 

Share this post


Link to post
Share on other sites
jayat1familytree

One Correction....

You should follow up on the items with 0.

I have retested and TNG will assign an ID to a repository without any address info. AND it will create a record in the tng_address table, even if it's just the repository name.

Share this post


Link to post
Share on other sites
jhculbert

Thanks again, Jay!  I checked, and those repositories with an addressID of 0 (zero) simply do not have an address entered for them (yet!).

Now, another related question.  Why would TNG have both an ID and a repoID assigned to each repository?  These always seem to be different (ignoring the R or REPO prefix for the repoID).  I would think the repoID would suffice for the SQL database.  So, how is the ID used, since this item is not something I see when working with the data.

 

Share this post


Link to post
Share on other sites
jayat1familytree

I would  guess because some programs assign a repository number and then that is included in the gedcom. That is the way it is for my Legacy gedcoms that I import into tng

 

0 @R4@ REPO
1 NAME Family History Library
1 ADDR Family History Library
2 CONT 35 N. West Temple Street
2 CONT Salt Lake City, Utah  84150
2 _NAME Family History Library
2 ADR1 35 N. West Temple Street
2 ADR2 Salt Lake City, Utah  84150
0 @R1881@ REPO
1 NAME Ancestry.com

 

Hope that helps.

Jay

 

Share this post


Link to post
Share on other sites
jhculbert

Makes sense, but is that ID from the GEDCOM actually used by TNG?  If you look at your Family History Library repository as listed in your repositories.bak file, what does it have for an ID and repoID?

Thanks, again!

Share this post


Link to post
Share on other sites
jayat1familytree

Yes,  TNG keeps the repository number from the gedcom 'R4' as the 'repoID'  and has assigned it as record "ID' 2

 

 

tng_repository.jpg

 

 

 

 

Share this post


Link to post
Share on other sites
jhculbert

Thanks again, Jay.  This confirms what I suspected.

Since I do not load GEDCOMs, but instead manually update my TNG site online as my primary database, it has been a long time since I worked with a GEDCOM.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×