Database Views

Author: Michelle McCausland

Views are static tables created, for example, on Crown Castle's databases to allow for more efficient querying of data.

Views are static and will only be accurate to the values present at the time of the view creation.

This means that any modifications to the table fields will not propagate to the view unless the view is manually updated.

See CCSUPPORT-2400 and CCSUPPORT-2162 for examples of work on the views for CC

In order to manually update the views for CCSUPPORT-2400 it was necessary to run the following queries on the production master db:

create or replace view v_tc_f_field_tech_site_visit as
select *
from ticketer.ticket_change tc, ticketer.f_field_tech_site_visit ftsv
where
tc.id = ftsv.change_id;

create or replace view ticketer.v_tc_f_crown_das_noc as
select *
from ticketer.ticket_change tc, ticketer.f_crown_das_noc cdn
where
tc.id = cdn.change_id;

A project was created to manually refresh the views: https://bitbucket.org/errigal/idmsviewsmaintenanceproject/commits/all

Via a jenkins build: http://apate.err:8080/jenkins/job/crownqaidmsviewsrefreshproject/

But it is not known (need to review) why this was only implemented on QA and not production.