Data differences

The easiest way to create a database-abstraction interface is to use views to access the data. In this case, if we want to change the table structure, it can be done without changing the code of the external applications.

The only thing necessary is to update the definitions of the interface views. Moreover, if we wanted to, for example, remove a column from a table that is used in a view, PostgreSQL will not allow this. This way, the objects in the database that are used by applications will be protected from undesired changes.

Nevertheless, if the database structure was changed and the view definitions were updated accordingly, it's important to check whether the new views return the same data as the old.

Sometimes, it's ...

Get Learning PostgreSQL 11 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.