Transforming and Updating Data
In previous chapters, you learned how to populate data using different commands and statements. As data enters a table, it is common that you will need to change some of the values. First of all, the source data may change. A customer may move to a new address. An employee may get a promotion. The changes in the real world require changes in the tables. Existing data may also need corrections or updates, such as correcting a typo during data entry time. That’s why update is such an important operation in the data CRUD (short for create, read, update, delete) lifecycle.
The change may happen not only to table data but also to table structures. Tables are a reflection of entities and relationships in the real world. As entities and relationships evolve, new attributes come in, and old attributes get dropped. Twenty years ago, it was hard to imagine a customer profile without a home phone. These days, a lot of customers have cell phones, but...