Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add info about updating incorrect country values.

...

The UI allows for the creation, search, modification, and deletion of nodes.  As a rule, nodes should not be deleted from the database for referential integrity reasons -- even though there is only one table in the database, various processes use this table in concert with the flat files that contain the raw and analyzed PingER results.

Updating the list of countries in the UI

Inside the UI, the country and continent (region) are set and restricted to a pop-up list of values. The pop-up list is based on a separate table called COUNTRY. New countries can be added to the list by creating new rows in the COUNTRY table with SQL INSERT statements. See Updating NODEDETAILS with SQLPlus

Example:

Code Block
sql
sql
insert into country (country_id, country, continent, tld)
values (country_seq.nextval, 'Bermuda', 'Latin America', 'bm')

The COUNTRY table is not used except by the list of values in the UI. Note that if a country name needs to be changed or if a country was placed in the wrong region, it must be updated on all the nodes in the NODEDETAILS table as well as on the COUNTRY table.

To update the COUNTRY table to fix the list of values, get the COUNTRY_ID for the location that needs correction:

Code Block
sql
sql

select country_id, country, continent from country
where country like 'Demo%';

Then update the COUNTRY table:

Code Block
sql
sql

update country set country = 'Democratic Republic of Congo'
where country_id = 461;

Finally fix any incorrect entries in the actual NODEDETAILS table by putting the correct country in the set clause and the incorrect value in the where clause.

Code Block
sql
sql

update nodedetails set country = 'Democratic Republic of Congo' 
where country = 'Democratic Repulic of Congo';

To re-assign a country from one region to another, change the CONTINENT value in both tables.