What Is Database Migration?
What Is Database Migration?
Learn about database migration and explore the benefits and challenges of it.
Join the DZone community and get the full member experience.Join For Free
Database migration — in the context of enterprise applications — means moving your data from one platform to another. There are many reasons you might want to move to a different platform. For example, a company might decide to save money by moving to a cloud-based database. Or a company might find that some particular database software has features that are critical for their business needs. Or the legacy systems are simply outdated. The process of database migration can involve multiple phases and iterations, including assessing the current databases and future needs of the company, migrating the schema, and normalizing and moving the data. Plus, testing, testing, and more testing.
Benefits of Database Migration
Costs. One of the primary reasons that companies migrate databases is to save money. Often, companies will move from an on-premise database to a cloud database. This saves on infrastructure as well as the manpower and expertise needed to support it.
Modernized software. Another common reason for migration is to move from an outdated system or legacy systems to a system that is designed for modern data needs. In the age of big data, new storage techniques are a necessity. For example, a company might choose to move from a legacy SQL database to a data lake or another flexible system.
One source of truth. Another common reason to migrate data is to move all the data into one place that is accessible by all divisions of the company. Sometimes, this occurs after an acquisition, when systems need to be combined. Or, it can happen when different systems are siloed throughout a company. For example, the IT department might use one database while the Marketing group uses another database and these systems cannot "talk" to each other. When you have different databases that are incompatible, it's hard to get insights from your data.
Database Migration Challenges
Database migration can be very complex, but with proper planning, these common challenges can be mitigated:
Challenge #1: Finding Your Siloed Databases
If your company has been around a while, you likely have many disparate databases that exist within various parts of your company. They may be in different departments and different geographies. They may have been brought in through acquisitions. Part of your task in migrating databases is to locate the disparate databases in your company and plan how you will normalize data and convert schemas.
Challenge #2: Data Loss or Corruption
When migrating databases, it's critical to ensure your data is safely moved without loss or corruption. You'll need to plan how to test for data loss or corruption that can happen when you move data from one system to another.
Challenge # 3: Security
When you move data from one platform to another, it's critical that the data is secure. Unfortunately, there are many nefarious actors who would love to get their hands on the personal data you have stored away. You might choose to encrypt the data or remove personally identifiable information (PII) as a part of the migration process.
How Is Database Migration Done?
Database migration is a multiphase process that involves some or all the following steps:
Assessment. At this stage, you'll need to gather business requirements, assess the costs and benefits, and perform data profiling. Data profiling is a process by which you get to know your existing data and database schema. You'll also need to plan how you will move the data — will you use an ETL (Extraction, Transformation, and Loading) tool, scripting, or some other tool to move the data?
Database schema conversion. The schema is a blueprint of how the database is structured, and it varies based on the rules of a given database. When you move data from one system to another, you'll need to convert the schemas so that the structure of the data works with the new database.
Data migration. After you have completed all the preliminary requirements, you'll need to actually move the data. This may involve scripting or using an ETL tool or some other tool to move the data. During the migration, you will likely transform the data, normalize data types, and check for errors.
Testing and tuning. Once you've moved the data, you need to verify that the data was moved correctly, is complete, isn't missing values, doesn't contain null values, and is valid.
Let us know your thoughts in the comments below.
Published at DZone with permission of Garrett Alley , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.