Back to blog home page

BYOD – Bring Your Own Database

Posted by on Feb 11, 2015

It can be tough to gauge migration efforts when evaluating Backend-as-a-Service (BaaS)  providers. If you are building a brand new web application, you are usually not particularly concerned with the costs to migrate to the new application infrastructure. However, if you have an existing application that you are porting to a new provider, you’re faced with a problem: what do you do with your data? Below we’ll look at the core challenges in migrating to providers like Firebase and Parse, and then evaluate a different approach to data as presented by Backand.

Migrating SQL to NoSQL

The primary issue driving this discussion is that providers such as Firebase and Parse use a NoSQL database behind the scenes. In most cases, this requires redesigning your entire data structure to account for the new storage method. If you are porting a SQL-based database to a NoSQL environment, you face a number of headaches. First, you need to transform your SQL data to an acceptable NoSQL structure, which requires writing complicated code to modify the data. Then, you need to have the ability to troubleshoot any problems encountered when creating the NoSQL data, which can be challenging if you lack NoSQL experience in-house. Finally, once the data has been converted you need to perform verification on the data to ensure everything was recorded correctly – a crucial concern when dealing with vital data for existing customers.

The Standard Migration Process

For most NoSQL providers, the general approach to migrating your data resembles the following:

  • Create your desired database structure in the new system using the available tools
  • Write tools that export your existing data into the new format
  • Perform a series of web requests to the provided RESTful API to populate the database with your existing data

While the above has the potential to provide for a smooth transition, there are many complexities hidden behind the three bullet points. Simple translation of the data, for example, can require writing a lot of complex queries with multiple joins to return the data in the correct format. In addition, designing an efficient NoSQL data structure can be challenging when the medium itself is unfamiliar. Finally, sending data over as a series of web requests can be both fragile and error-prone, particularly if you are working with a large data set.

What About Structure Changes?

The above issues are further compounded by one simple fact about web applications: the only constant is change! As your application evolves, adds new features, removes old ones, and so on, this will ultimately result in changes to the underlying data format. While both Parse and Firebase provide tools to migrate and manipulate your data structure, they require you to use their tools and APIs to do so. If you have an application development environment and development expertise built around making modifications in an existing tool chain, this can serve as another point of failure in your development process.

Why Not BYOD?

Backand, in stark contrast to other providers, looks at the problem from a different direction. Instead of having you recreate your data structures and repopulate your data store with the same data in a different format, Backand allows you to provide your own database as a starting point. Our software allows you to link directly to an existing database stored on another provider, and builds your back-end’s data representation from scratch by analyzing the underlying structure of your SQL database. All of this happens in minutes, not days, and with no interaction from you or your development team whatsoever. RESTful APIs are generated on top of your data automatically, and links between the data are deduced by analyzing foreign key relationships between your tables. When the process is completed, you are left with a backend that not only includes all of your existing data, but provides several API endpoints that allow you to manipulate your data using simple JSON. Additionally, this process is not a one-time endeavor. With the click of a button on the Backand dashboard, your database can be re-scanned and the APIs rebuilt to match an evolving database structure. This allows you to use well-known tools to handle database migrations, and integrate with an existing tool chain that might not fit well with a proprietary migration handling pattern.

Conclusion

When developing a web application from scratch, the question of underlying data structure is focused on architecture. The goal becomes determining the best way to represent data that has not yet been populated. However, if you have an existing application with a populated database, you cannot solely focus on the ideal architecture for your data – you need to maintain data integrity while also integrating your existing development pipeline with your data provider. At Backand, we provide tools to make this process easy by allowing you to BYOD – Bring Your Own Database. By using Angular to analyze your underlying data, we remove the guesswork from the migration process and allow you to continue to use your tried-and-tested data storage tools to manage and manipulate your data.

Build your Angular app and connect it to any database with Backand today. – Get started now.