Perfecting the UNIGEDS place schema
Jul 27, 2024 18:54:19 GMT -8
Post by Uncle Buddy on Jul 27, 2024 18:54:19 GMT -8
Ideally, nested_place_id should be linked only to events and the current nested place autofill in the places tab, because it is only an autofill string for place autofill fields. Since it's a compound element that exists for display purposes only, it doesn't make sense to do logic with it. Unlike the `couple` element, which is also a compound element comprised only of foreign keys, the nested place "Fairbanks, Alaska, USA" is not a different thing from "Fairbanks". The added information is just what the user needs to see, especially if there are multiple places named "Fairbanks".
Wherever possible, the user is shown the whole nesting, but the code deals with nest0, the place_id that references "Casper" in "Casper, Wyoming, USA" or "West Berlin" in "West Berlin, West Germany". The result of this delineation, which will prevent confusion, is to not link nested_place_id to anything except events and other GUI parts where an autofill is being used. So when the user specifies a nested place, the code has to extract `nest0` and perform logic on that element. For example, in places.py, the `delete_current_place` method gets a nesting string from the user, gets the nested_place_id, gets nest0 from that record, and deletes references to the place_id that equals nest0.
To test this strict delineation, the UNIGEDS table schemas will have to be scoured for references to nested_place_id such as the one in media_links. These have to be removed from the schema and the links put on place_id instead. This is more work now but will hopefully put the finishing touch on UNIGEDS' place schema, by making it as simple as possible under the circumstances.
This raises a question. Possibly also the nested_place table could be removed from unigeds.db and changed to a vendor-added table called nested_place_tbd in Treebard's per-tree copies of unigeds.db. However, there is no genieware on earth that could or should get away with displaying Paris as "Paris" in the GUI, it has to be displayed as "Paris, France" or "Paris, Texas" or the user is lost. Therefore I'm leaving nested_place in unigeds.db as it is an essential part of everything done with places in the UNIGEDS schema in order to store and use place references with the clarity, accuracy and detail demanded by the goal of representing real-world places.
Wherever possible, the user is shown the whole nesting, but the code deals with nest0, the place_id that references "Casper" in "Casper, Wyoming, USA" or "West Berlin" in "West Berlin, West Germany". The result of this delineation, which will prevent confusion, is to not link nested_place_id to anything except events and other GUI parts where an autofill is being used. So when the user specifies a nested place, the code has to extract `nest0` and perform logic on that element. For example, in places.py, the `delete_current_place` method gets a nesting string from the user, gets the nested_place_id, gets nest0 from that record, and deletes references to the place_id that equals nest0.
To test this strict delineation, the UNIGEDS table schemas will have to be scoured for references to nested_place_id such as the one in media_links. These have to be removed from the schema and the links put on place_id instead. This is more work now but will hopefully put the finishing touch on UNIGEDS' place schema, by making it as simple as possible under the circumstances.
This raises a question. Possibly also the nested_place table could be removed from unigeds.db and changed to a vendor-added table called nested_place_tbd in Treebard's per-tree copies of unigeds.db. However, there is no genieware on earth that could or should get away with displaying Paris as "Paris" in the GUI, it has to be displayed as "Paris, France" or "Paris, Texas" or the user is lost. Therefore I'm leaving nested_place in unigeds.db as it is an essential part of everything done with places in the UNIGEDS schema in order to store and use place references with the clarity, accuracy and detail demanded by the goal of representing real-world places.