Continuous delivery (CD) is nice and easy for a stateless application, that is, for an application that does not have data persistently stored. Installing a new application version is a simple task, which just requires the installation of the new binaries (or sources, in case of a language that’s not compiled), stopping the old instance, and starting a new instance.
As soon as there is persistent state to consider, things become more complicated. Here, I will consider traditional relational databases with schemas. You can avoid some problems by using a schema-less “noSQL” ...