Transacting in a Relational Database

SQL is a language used to transact with a Relational Database. If you are unfamiliar with SQL, you can quickly get a flavor for it over here: https://www.w3schools.com/sql/
SQL statements can be used to create, delete and update databases. The concept is based on the principle of transactions - till you commit a set of modifications, none of them are done. When you commit, all of them are done together. This way, 'integrity' of the data is guaranteed.

However, strict schema management may have its downfalls...

What if we need to add columns or the type of a column changes? What happens to applications that were written with old assumptions in mind?

In the example we saw before, what if the schema changes?

Let's say we discover that the economic zone is more important than the region. So we'd like to replace the region field. Economic zones have abbreviations like ASEAN, EMEA, etc. This change may be driven by considerations of cost: Costs are less when the part or service is delivered from the same economic region.

Here's the change we need to make. You can see that multiple experts are present now in the experts table, since an economic region will have multiple experts for the same device, any of who can respond.


It would be terrible if all applications need to be re-written to adapt to the new field. In fact, the company may not step into the new way of working all at once. Normally, each region would take a different duration to move, depending on its span, market size, etc.

Can you think of a way to migrate the data region-by-region? Let us know your thoughts below.

Read on to explore some ways in which this can be done...

Comments

Popular posts from this blog

Relationships in a Relational Database

Data Schema and Blobs

JavaScript data-types